4 implementations of Encrypt
KeyManagementSimulator (1)
Program.cs (1)
283
byte[] IAuthenticatedEncryptor.
Encrypt
(ArraySegment<byte> plaintext, ArraySegment<byte> _additionalAuthenticatedData) => plaintext.ToArray();
Microsoft.AspNetCore.DataProtection (3)
Cng\Internal\CngAuthenticatedEncryptorBase.cs (1)
48
public byte[]
Encrypt
(ArraySegment<byte> plaintext, ArraySegment<byte> additionalAuthenticatedData)
Managed\AesGcmAuthenticatedEncryptor.cs (1)
222
public byte[]
Encrypt
(ArraySegment<byte> plaintext, ArraySegment<byte> additionalAuthenticatedData)
Managed\ManagedAuthenticatedEncryptor.cs (1)
280
public byte[]
Encrypt
(ArraySegment<byte> plaintext, ArraySegment<byte> additionalAuthenticatedData)
12 references to Encrypt
Microsoft.AspNetCore.DataProtection (4)
AuthenticatedEncryption\AuthenticatedEncryptorExtensions.cs (3)
24
return encryptor.
Encrypt
(plaintext, additionalAuthenticatedData);
28
var temp = encryptor.
Encrypt
(plaintext, additionalAuthenticatedData);
47
var protectedData = encryptor.
Encrypt
(new ArraySegment<byte>(plaintextAsBytes), new ArraySegment<byte>(aad));
AuthenticatedEncryption\IAuthenticatedEncryptorFactory.cs (1)
20
/// be considered equivalent, e.g., the payload returned by one's <see cref="IAuthenticatedEncryptor.
Encrypt
(ArraySegment{byte}, ArraySegment{byte})"/>
Microsoft.AspNetCore.DataProtection.Tests (8)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
39
byte[] ciphertext = control.
Encrypt
(new ArraySegment<byte>(plaintext), new ArraySegment<byte>(aad));
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
46
byte[] ciphertext = control.
Encrypt
(new ArraySegment<byte>(plaintext), new ArraySegment<byte>(aad));
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
43
byte[] ciphertext = control.
Encrypt
(new ArraySegment<byte>(plaintext), new ArraySegment<byte>(aad));
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializerTests.cs (2)
47
byte[] ciphertext = control.
Encrypt
(new ArraySegment<byte>(plaintext), new ArraySegment<byte>(aad));
81
byte[] ciphertext = control.
Encrypt
(new ArraySegment<byte>(plaintext), new ArraySegment<byte>(aad));
KeyManagement\KeyRingBasedDataProtectorTests.cs (3)
45
.Setup(o => o.
Encrypt
(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))
83
.Setup(o => o.
Encrypt
(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))
594
.Setup(o => o.
Encrypt
(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))