Ejemplo n.º 1
0
 private void DecryptInternal(
     ReadOnlySpan <byte> nonce,
     ReadOnlySpan <byte> ciphertext,
     ReadOnlySpan <byte> tag,
     Span <byte> plaintext,
     ReadOnlySpan <byte> associatedData = default)
 {
     AesAEAD.Decrypt(s_aesGcm, _keyHandle, nonce, associatedData, ciphertext, tag, plaintext, clearPlaintextOnFailure: true);
 }
Ejemplo n.º 2
0
 private void DecryptInternal(
     ReadOnlySpan <byte> nonce,
     ReadOnlySpan <byte> ciphertext,
     ReadOnlySpan <byte> tag,
     Span <byte> plaintext,
     ReadOnlySpan <byte> associatedData = default)
 {
     // BCrypt implementation of CCM clears plaintext for you on failure
     AesAEAD.Decrypt(s_aesCcm, _keyHandle, nonce, associatedData, ciphertext, tag, plaintext, clearPlaintextOnFailure: false);
 }