1 write to _validationAlgorithmDigestLengthInBytes
Microsoft.AspNetCore.DataProtection (1)
Managed\ManagedAuthenticatedEncryptor.cs (1)
63
_validationAlgorithmDigestLengthInBytes
= validationAlgorithm.GetDigestSizeInBytes();
13 references to _validationAlgorithmDigestLengthInBytes
Microsoft.AspNetCore.DataProtection (13)
Managed\ManagedAuthenticatedEncryptor.cs (13)
64
_validationAlgorithmSubkeyLengthInBytes =
_validationAlgorithmDigestLengthInBytes
; // for simplicity we'll generate MAC subkeys with a length equal to the digest length
70
AlgorithmAssert.IsAllowableValidationAlgorithmDigestSize(checked((uint)
_validationAlgorithmDigestLengthInBytes
* 8));
82
if (ciphertext.Length < checked(KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_validationAlgorithmDigestLengthInBytes
))
88
var estimatedDecryptedSize = ciphertext.Length - (KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_validationAlgorithmDigestLengthInBytes
);
97
var macOffset = ciphertext.Length -
_validationAlgorithmDigestLengthInBytes
;
133
var providedMac = ciphertext.Slice(macOffset,
_validationAlgorithmDigestLengthInBytes
);
180
var macLength =
_validationAlgorithmDigestLengthInBytes
;
289
var outputSize = KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes /* IV */ + cipherTextLength +
_validationAlgorithmDigestLengthInBytes
/* MAC */;
473
var outputSize = protectedPayload.Count - (KEY_MODIFIER_SIZE_IN_BYTES + _symmetricAlgorithmBlockSizeInBytes +
_validationAlgorithmDigestLengthInBytes
);
606
+
_validationAlgorithmDigestLengthInBytes
/* digest of HMACed empty string */)];
620
BitHelpers.WriteTo(retVal, ref idx,
_validationAlgorithmDigestLengthInBytes
);
653
CryptoUtil.Assert(digest != null && digest.Length ==
_validationAlgorithmDigestLengthInBytes
, "digest != null && digest.Length == _validationAlgorithmDigestLengthInBytes");
657
idx +=
_validationAlgorithmDigestLengthInBytes
;