Implemented interface member:
property
Length
Microsoft.AspNetCore.DataProtection.ISecret.Length
24 references to Length
Microsoft.AspNetCore.DataProtection (16)
Managed\AesGcmAuthenticatedEncryptor.cs (2)
104var decryptedKdk = new byte[_keyDerivationKey.Length]; 178var decryptedKdk = new byte[_keyDerivationKey.Length];
Managed\ManagedAuthenticatedEncryptor.cs (6)
198Span<byte> decryptedKdk = _keyDerivationKey.Length <= 256 199? stackalloc byte[256].Slice(0, _keyDerivationKey.Length) 200: new byte[_keyDerivationKey.Length]; 309Span<byte> decryptedKdk = _keyDerivationKey.Length <= 256 310? stackalloc byte[256].Slice(0, _keyDerivationKey.Length) 311: new byte[_keyDerivationKey.Length];
Secret.cs (6)
239if (buffer.Count != Length) 241throw Error.Common_BufferIncorrectlySized(nameof(buffer), actualSize: buffer.Count, expectedSize: Length); 245if (Length != 0) 268if (bufferLength != Length) 270throw Error.Common_BufferIncorrectlySized(nameof(bufferLength), actualSize: bufferLength, expectedSize: Length); 273if (Length != 0)
SP800_108\SP800_108_CTR_HMACSHA512Util.cs (1)
41var secretLengthInBytes = checked((uint)kdk.Length);
XmlEncryption\XmlEncryptionExtensions.cs (1)
186var plaintextSecret = new byte[secret.Length];
Microsoft.AspNetCore.DataProtection.Tests (8)
SecretTests.cs (8)
31Assert.Equal(3, secret.Length); 58Assert.Equal(3, secret.Length); 81Assert.Equal(0, secret.Length); 120Assert.Equal(0, secret.Length); 140Assert.Equal(3, secret.Length); 163Assert.Equal(0, secret.Length); 173Assert.Equal(32, secret.Length); 188Assert.Equal(31, secret.Length);