1 write to _hmacAlgorithmDigestLengthInBytes
Microsoft.AspNetCore.DataProtection (1)
Cng\CbcAuthenticatedEncryptor.cs (1)
52
_hmacAlgorithmDigestLengthInBytes
= hmacAlgorithmHandle.GetHashDigestLength();
15 references to _hmacAlgorithmDigestLengthInBytes
Microsoft.AspNetCore.DataProtection (15)
Cng\CbcAuthenticatedEncryptor.cs (15)
53
_hmacAlgorithmSubkeyLengthInBytes =
_hmacAlgorithmDigestLengthInBytes
; // for simplicity we'll generate HMAC subkeys with a length equal to the digest length
58
AlgorithmAssert.IsAllowableValidationAlgorithmDigestSize(checked(
_hmacAlgorithmDigestLengthInBytes
* 8));
69
if (ciphertext.Length < checked(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_hmacAlgorithmDigestLengthInBytes
))
74
var cbEncryptedDataLength = checked(ciphertext.Length - (int)(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_hmacAlgorithmDigestLengthInBytes
));
180
var outputSize = ciphertext.Count - (int)(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_hmacAlgorithmDigestLengthInBytes
);
249
return checked((int)(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes + paddedCiphertextLength +
_hmacAlgorithmDigestLengthInBytes
));
313
var totalRequiredSize = checked((int)(cbKeyModifierAndIV + dwCiphertextSize +
_hmacAlgorithmDigestLengthInBytes
));
356
cbHashDigest:
_hmacAlgorithmDigestLengthInBytes
);
491
byte* pbActualDigest = stackalloc byte[checked((int)
_hmacAlgorithmDigestLengthInBytes
)];
492
hashHandle.HashData(pbInput, cbInput, pbActualDigest,
_hmacAlgorithmDigestLengthInBytes
);
493
return CryptoUtil.TimeConstantBuffersAreEqual(pbExpectedDigest, pbActualDigest,
_hmacAlgorithmDigestLengthInBytes
);
506
+
_hmacAlgorithmDigestLengthInBytes
/* digest of HMACed empty string */)];
522
BitHelpers.WriteTo(ref ptr,
_hmacAlgorithmDigestLengthInBytes
);
569
cbHashDigest:
_hmacAlgorithmDigestLengthInBytes
);
572
ptr +=
_hmacAlgorithmDigestLengthInBytes
;