1 write to _symmetricAlgorithmBlockSizeInBytes
Microsoft.AspNetCore.DataProtection (1)
Cng\CbcAuthenticatedEncryptor.cs (1)
49
_symmetricAlgorithmBlockSizeInBytes
= symmetricAlgorithmHandle.GetCipherBlockLength();
30 references to _symmetricAlgorithmBlockSizeInBytes
Microsoft.AspNetCore.DataProtection (30)
Cng\CbcAuthenticatedEncryptor.cs (30)
56
AlgorithmAssert.IsAllowableSymmetricAlgorithmBlockSize(checked(
_symmetricAlgorithmBlockSizeInBytes
* 8));
79
if (ciphertext.Length < checked(KEY_MODIFIER_SIZE_IN_BYTES +
_symmetricAlgorithmBlockSizeInBytes
+ _hmacAlgorithmDigestLengthInBytes))
84
var cbEncryptedDataLength = checked(ciphertext.Length - (int)(KEY_MODIFIER_SIZE_IN_BYTES +
_symmetricAlgorithmBlockSizeInBytes
+ _hmacAlgorithmDigestLengthInBytes));
93
byte* pbEncryptedData = &pbIV[
_symmetricAlgorithmBlockSizeInBytes
];
120
if (!ValidateHash(hashHandle, pbIV,
_symmetricAlgorithmBlockSizeInBytes
+ (uint)cbEncryptedDataLength, pbActualHmac))
130
byte* pbClonedIV = stackalloc byte[checked((int)
_symmetricAlgorithmBlockSizeInBytes
)];
131
UnsafeBufferUtil.BlockCopy(from: pbIV, to: pbClonedIV, byteCount:
_symmetricAlgorithmBlockSizeInBytes
);
140
cbIV:
_symmetricAlgorithmBlockSizeInBytes
,
151
byte* pbClonedIV2 = stackalloc byte[(int)
_symmetricAlgorithmBlockSizeInBytes
];
152
UnsafeBufferUtil.BlockCopy(from: pbIV, to: pbClonedIV2, byteCount:
_symmetricAlgorithmBlockSizeInBytes
);
164
cbIV:
_symmetricAlgorithmBlockSizeInBytes
,
190
var outputSize = ciphertext.Count - (int)(KEY_MODIFIER_SIZE_IN_BYTES +
_symmetricAlgorithmBlockSizeInBytes
+ _hmacAlgorithmDigestLengthInBytes);
235
byte* pbClonedIV = stackalloc byte[checked((int)
_symmetricAlgorithmBlockSizeInBytes
)];
236
UnsafeBufferUtil.BlockCopy(from: pbIV, to: pbClonedIV, byteCount:
_symmetricAlgorithmBlockSizeInBytes
);
245
cbIV:
_symmetricAlgorithmBlockSizeInBytes
,
259
return checked((int)(KEY_MODIFIER_SIZE_IN_BYTES +
_symmetricAlgorithmBlockSizeInBytes
+ paddedCiphertextLength + _hmacAlgorithmDigestLengthInBytes));
275
var cbKeyModifierAndIV = checked(KEY_MODIFIER_SIZE_IN_BYTES +
_symmetricAlgorithmBlockSizeInBytes
);
315
cbIV:
_symmetricAlgorithmBlockSizeInBytes
,
333
byte* pbOutputCiphertext = &pbOutputIV[
_symmetricAlgorithmBlockSizeInBytes
];
340
byte* pbClonedIV = stackalloc byte[checked((int)
_symmetricAlgorithmBlockSizeInBytes
)];
341
UnsafeBufferUtil.BlockCopy(from: pbIV, to: pbClonedIV, byteCount:
_symmetricAlgorithmBlockSizeInBytes
);
350
cbIV:
_symmetricAlgorithmBlockSizeInBytes
,
364
cbInput: checked(
_symmetricAlgorithmBlockSizeInBytes
+ dwCiphertextSize),
454
byte* pbDummyIV = stackalloc byte[checked((int)
_symmetricAlgorithmBlockSizeInBytes
)];
465
cbIV:
_symmetricAlgorithmBlockSizeInBytes
,
493
+
_symmetricAlgorithmBlockSizeInBytes
/* ciphertext of encrypted empty string */
506
BitHelpers.WriteTo(ref ptr,
_symmetricAlgorithmBlockSizeInBytes
);
537
fixed (byte* pbIV = new byte[
_symmetricAlgorithmBlockSizeInBytes
] /* will be zero-initialized */)
545
cbOutput:
_symmetricAlgorithmBlockSizeInBytes
);
548
ptr +=
_symmetricAlgorithmBlockSizeInBytes
;