Implemented interface member:
property
Length
Microsoft.AspNetCore.DataProtection.ISecret.Length
28 references to Length
Microsoft.AspNetCore.DataProtection (20)
Managed\AesGcmAuthenticatedEncryptor.cs (6)
101
Span<byte> decryptedKdk = _keyDerivationKey.
Length
<= 256
102
? stackalloc byte[256].Slice(0, _keyDerivationKey.
Length
)
103
: new byte[_keyDerivationKey.
Length
];
240
Span<byte> decryptedKdk = _keyDerivationKey.
Length
<= 256
241
? stackalloc byte[256].Slice(0, _keyDerivationKey.
Length
)
242
: new byte[_keyDerivationKey.
Length
];
Managed\ManagedAuthenticatedEncryptor.cs (6)
103
Span<byte> decryptedKdk = _keyDerivationKey.
Length
<= 256
104
? stackalloc byte[256].Slice(0, _keyDerivationKey.
Length
)
105
: new byte[_keyDerivationKey.
Length
];
201
Span<byte> decryptedKdk = _keyDerivationKey.
Length
<= 256
202
? stackalloc byte[256].Slice(0, _keyDerivationKey.
Length
)
203
: new byte[_keyDerivationKey.
Length
];
Secret.cs (6)
239
if (buffer.Count !=
Length
)
241
throw Error.Common_BufferIncorrectlySized(nameof(buffer), actualSize: buffer.Count, expectedSize:
Length
);
245
if (
Length
!= 0)
268
if (bufferLength !=
Length
)
270
throw Error.Common_BufferIncorrectlySized(nameof(bufferLength), actualSize: bufferLength, expectedSize:
Length
);
273
if (
Length
!= 0)
SP800_108\SP800_108_CTR_HMACSHA512Util.cs (1)
41
var secretLengthInBytes = checked((uint)kdk.
Length
);
XmlEncryption\XmlEncryptionExtensions.cs (1)
186
var plaintextSecret = new byte[secret.
Length
];
Microsoft.AspNetCore.DataProtection.Tests (8)
SecretTests.cs (8)
33
Assert.Equal(3, secret.
Length
);
60
Assert.Equal(3, secret.
Length
);
83
Assert.Equal(0, secret.
Length
);
122
Assert.Equal(0, secret.
Length
);
142
Assert.Equal(3, secret.
Length
);
165
Assert.Equal(0, secret.
Length
);
175
Assert.Equal(32, secret.
Length
);
190
Assert.Equal(31, secret.
Length
);