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 58AlgorithmAssert.IsAllowableValidationAlgorithmDigestSize(checked(_hmacAlgorithmDigestLengthInBytes * 8)); 69if (ciphertext.Length < checked(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes + _hmacAlgorithmDigestLengthInBytes)) 74var cbEncryptedDataLength = checked(ciphertext.Length - (int)(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes + _hmacAlgorithmDigestLengthInBytes)); 180var outputSize = ciphertext.Count - (int)(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes + _hmacAlgorithmDigestLengthInBytes); 249return checked((int)(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes + paddedCiphertextLength + _hmacAlgorithmDigestLengthInBytes)); 313var totalRequiredSize = checked((int)(cbKeyModifierAndIV + dwCiphertextSize + _hmacAlgorithmDigestLengthInBytes)); 356cbHashDigest: _hmacAlgorithmDigestLengthInBytes); 491byte* pbActualDigest = stackalloc byte[checked((int)_hmacAlgorithmDigestLengthInBytes)]; 492hashHandle.HashData(pbInput, cbInput, pbActualDigest, _hmacAlgorithmDigestLengthInBytes); 493return CryptoUtil.TimeConstantBuffersAreEqual(pbExpectedDigest, pbActualDigest, _hmacAlgorithmDigestLengthInBytes); 506+ _hmacAlgorithmDigestLengthInBytes /* digest of HMACed empty string */)]; 522BitHelpers.WriteTo(ref ptr, _hmacAlgorithmDigestLengthInBytes); 569cbHashDigest: _hmacAlgorithmDigestLengthInBytes); 572ptr += _hmacAlgorithmDigestLengthInBytes;