Skip to content

AesGcm Class ​

Definition ​

Public class for performing Symmetric encryption and decryption using GCM (Galois/Counter Mode)

  • Namespace: JASE.Crypto
  • Assembly: JASE.Crypto.dll

Methods ​

NameDescription
byte[] Decrypt(byte[] encryptedData, AesGcmOptions options)Decrypts a byte array using AES-GCM with the provided associated AesGcmOptions
byte[] Decrypt(byte[] encryptedData, byte[] key, byte[] associatedMetaData = null, Encoding encoding = null, AesEnvelopeFormat? format = null)Decrypts a byte array using AES-GCM with the given key and optional associated metadata.
byte[] Decrypt(byte[] input, string passPhrase, byte[] associatedMetaData = null, Encoding encoding = null, AesEnvelopeFormat? format = null)Decrypts a self-describing JASE envelope using only a passphrase. The salt, iteration count, hash and KDF algorithm are read from the envelope itself, so no salt argument is required.
byte[] Decrypt(byte[] input, string passPhrase, string salt, byte[] associatedMetaData = null, Encoding encoding = null, int iterations = null, AesEnvelopeFormat? format = null)Decrypts a Base64 encoded string using AES-GCM and a passphrase and salt.
byte[] Decrypt(byte[] input, string passPhrase, string salt, string associatedMetaData, Encoding encoding = null, int iterations = null, AesEnvelopeFormat? format = null)Decrypts a Base64 encoded string using AES-GCM and a passphrase and salt.
string Decrypt(string base64input, string passPhrase, byte[] associatedMetaData = null, Encoding encoding = null, AesEnvelopeFormat? format = null)Decrypts a self-describing JASE envelope using only a passphrase. The salt, iteration count, hash and KDF algorithm are read from the envelope itself, so no salt argument is required.
string Decrypt(string base64input, string passPhrase, string salt, byte[] associatedMetaData = null, Encoding encoding = null, int iterations = null, AesEnvelopeFormat? format = null)Decrypts a Base64 encoded string using AES-GCM and a passphrase and salt.
string Decrypt(string base64input, string passPhrase, string salt, string associatedMetaData, Encoding encoding = null, int iterations = null, AesEnvelopeFormat? format = null)Decrypts a Base64 encoded string using AES-GCM and a passphrase and salt.
string Decrypt(string input, AesGcmOptions options)Decrypts a Base64 encoded string using AES-GCM with the provided associated AesGcmOptions
string Decrypt(string input, byte[] key, byte[] associatedMetaData = null, Encoding encoding = null, AesEnvelopeFormat? format = null)Decrypts a string using AES-GCM with the given key and optional associated metadata.
byte[] Encrypt(byte[] input, AesGcmOptions options)Encrypts a byte array using AES-GCM with the provided associated AesGcmOptions
byte[] Encrypt(byte[] input, byte[] key, byte[] associatedMetaData = null, Encoding encoding = null, AesEnvelopeFormat? format = null)Encrypts a byte array using AES-GCM with the given key and optional associated metadata.
byte[] Encrypt(byte[] input, string passPhrase, string salt, byte[] associatedMetaData = null, Encoding encoding = null, int iterations = null, AesEnvelopeFormat? format = null)Encrypts a string using AES-GCM with a passphrase and salt.
byte[] Encrypt(byte[] input, string passPhrase, string salt, string associatedMetaData, Encoding encoding = null, int iterations = null, AesEnvelopeFormat? format = null)Encrypts a string using AES-GCM with a passphrase and salt.
string Encrypt(string input, AesGcmOptions options)Encrypts a string using AES-GCM with the provided associated AesGcmOptions
string Encrypt(string input, byte[] key, byte[] associatedMetaData = null, Encoding encoding = null, AesEnvelopeFormat? format = null)Encrypts a string using AES-GCM with the given key and optional associated metadata.
string Encrypt(string input, string passPhrase, string salt, byte[] associatedMetaData = null, Encoding encoding = null, int iterations = null, AesEnvelopeFormat? format = null)Encrypts a string using AES-GCM with a passphrase and salt.
string Encrypt(string input, string passPhrase, string salt, string associatedMetaData, Encoding encoding = null, int iterations = null, AesEnvelopeFormat? format = null)Encrypts a string using AES-GCM with a passphrase and salt.