13 references to NONCE_SIZE_IN_BYTES
Microsoft.AspNetCore.DataProtection (13)
Cng\CngGcmAuthenticatedEncryptor.cs (13)
74if (ciphertext.Length < KEY_MODIFIER_SIZE_IN_BYTES + NONCE_SIZE_IN_BYTES + TAG_SIZE_IN_BYTES) 79var plaintextLength = checked(ciphertext.Length - (int)(KEY_MODIFIER_SIZE_IN_BYTES + NONCE_SIZE_IN_BYTES + TAG_SIZE_IN_BYTES)); 88byte* pbEncryptedData = &pbNonce[NONCE_SIZE_IN_BYTES]; 119authInfo.cbNonce = NONCE_SIZE_IN_BYTES; 157var outputSize = ciphertext.Count - (int)(KEY_MODIFIER_SIZE_IN_BYTES + NONCE_SIZE_IN_BYTES + TAG_SIZE_IN_BYTES); 205authCipherInfo.cbNonce = NONCE_SIZE_IN_BYTES; 237var totalRequiredSize = checked((int)(KEY_MODIFIER_SIZE_IN_BYTES + NONCE_SIZE_IN_BYTES + plaintext.Length + TAG_SIZE_IN_BYTES)); 247byte* pbEncryptedData = &pbNonce[NONCE_SIZE_IN_BYTES]; 251_genRandom.GenRandom(pbKeyModifier, KEY_MODIFIER_SIZE_IN_BYTES + NONCE_SIZE_IN_BYTES); 310var size = checked((int)(KEY_MODIFIER_SIZE_IN_BYTES + NONCE_SIZE_IN_BYTES + plaintext.Count + TAG_SIZE_IN_BYTES)); 380BitHelpers.WriteTo(ref ptr, NONCE_SIZE_IN_BYTES); 403byte* pbNonce = stackalloc byte[(int)NONCE_SIZE_IN_BYTES]; 404UnsafeBufferUtil.SecureZeroMemory(pbNonce, NONCE_SIZE_IN_BYTES);