Pass Span instead of Memory
This commit is contained in:
parent
650fe99990
commit
ccc00d8e80
10 changed files with 45 additions and 38 deletions
|
|
@ -22,7 +22,7 @@ public class DekEncryptionService : IDekEncryptionService
|
|||
// throw new Exception("Key must be 256 bits (32 bytes) for AES‑256‑GCM.");
|
||||
}
|
||||
|
||||
public EncryptedDek Encrypt(ReadOnlyMemory<byte> plaintext)
|
||||
public EncryptedDek Encrypt(ReadOnlySpan<byte> plaintext)
|
||||
{
|
||||
var encryptionKey = ActiveKey;
|
||||
byte[] cipher = Encryption.Encrypt(plaintext, encryptionKey.Key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue