1 write to _validationAlgorithmDigestLengthInBytes
Microsoft.AspNetCore.DataProtection (1)
Managed\ManagedAuthenticatedEncryptor.cs (1)
71
_validationAlgorithmDigestLengthInBytes
= validationAlgorithm.GetDigestSizeInBytes();
14 references to _validationAlgorithmDigestLengthInBytes
Microsoft.AspNetCore.DataProtection (14)
Managed\ManagedAuthenticatedEncryptor.cs (14)
72
_validationAlgorithmSubkeyLengthInBytes =
_validationAlgorithmDigestLengthInBytes
; // for simplicity we'll generate MAC subkeys with a length equal to the digest length
78
AlgorithmAssert.IsAllowableValidationAlgorithmDigestSize(checked((uint)
_validationAlgorithmDigestLengthInBytes
* 8));
100
if (ciphertext.Length < checked(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_validationAlgorithmDigestLengthInBytes
))
106
var estimatedDecryptedSize = ciphertext.Length - (KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_validationAlgorithmDigestLengthInBytes
);
115
var macOffset = ciphertext.Length -
_validationAlgorithmDigestLengthInBytes
;
151
var providedMac = ciphertext.Slice(macOffset,
_validationAlgorithmDigestLengthInBytes
);
198
var macLength =
_validationAlgorithmDigestLengthInBytes
;
305
var outputSize = KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes /* IV */ + cipherTextLength +
_validationAlgorithmDigestLengthInBytes
/* MAC */;
412
var hashSize =
_validationAlgorithmDigestLengthInBytes
;
480
var outputSize = protectedPayload.Count - (KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_validationAlgorithmDigestLengthInBytes
);
613
+
_validationAlgorithmDigestLengthInBytes
/* digest of HMACed empty string */)];
627
BitHelpers.WriteTo(retVal, ref idx,
_validationAlgorithmDigestLengthInBytes
);
660
CryptoUtil.Assert(digest != null && digest.Length ==
_validationAlgorithmDigestLengthInBytes
, "digest != null && digest.Length == _validationAlgorithmDigestLengthInBytes");
664
idx +=
_validationAlgorithmDigestLengthInBytes
;