C# Class R.Scheduler.Core.AESGCM

Afficher le fichier Open project: R-Suite/R.Scheduler

Méthodes publiques

Свойство Type Description
Iterations int
KeyBitSize int
MacBitSize int
MinPasswordLength int
NonceBitSize int
SaltBitSize int

Méthodes publiques

Méthode Description
NewKey ( ) : byte[]

Helper that generates a random new key on each call.

SimpleDecrypt ( byte encryptedMessage, byte key, int nonSecretPayloadLength ) : byte[]

Simple Decryption & Authentication (AES-GCM) of a UTF8 Message

SimpleDecrypt ( string encryptedMessage, byte key, int nonSecretPayloadLength ) : string

Simple Decryption & Authentication (AES-GCM) of a UTF8 Message

SimpleDecryptWithPassword ( byte encryptedMessage, string password, int nonSecretPayloadLength ) : byte[]

Simple Decryption and Authentication of a UTF8 message using a key derived from a password

Significantly less secure than using random binary keys.

SimpleDecryptWithPassword ( string encryptedMessage, string password, int nonSecretPayloadLength ) : string

Simple Decryption and Authentication (AES-GCM) of a UTF8 message using a key derived from a password (PBKDF2)

Significantly less secure than using random binary keys.

SimpleEncrypt ( byte secretMessage, byte key, byte nonSecretPayload = null ) : byte[]

Simple Encryption And Authentication (AES-GCM) of a UTF8 string.

Adds overhead of (Optional-Payload + BlockSize(16) + Message + HMac-Tag(16)) * 1.33 Base64

SimpleEncrypt ( string secretMessage, byte key, byte nonSecretPayload = null ) : string

Simple Encryption And Authentication (AES-GCM) of a UTF8 string.

Adds overhead of (Optional-Payload + BlockSize(16) + Message + HMac-Tag(16)) * 1.33 Base64

SimpleEncryptWithPassword ( byte secretMessage, string password, byte nonSecretPayload = null ) : byte[]

Simple Encryption And Authentication (AES-GCM) of a UTF8 String using key derived from a password.

Significantly less secure than using random binary keys. Adds additional non secret payload for key generation parameters.

SimpleEncryptWithPassword ( string secretMessage, string password, byte nonSecretPayload = null ) : string

Simple Encryption And Authentication (AES-GCM) of a UTF8 String using key derived from a password (PBKDF2).

Significantly less secure than using random binary keys. Adds additional non secret payload for key generation parameters.

Method Details

NewKey() public static méthode

Helper that generates a random new key on each call.
public static NewKey ( ) : byte[]
Résultat byte[]

SimpleDecrypt() public static méthode

Simple Decryption & Authentication (AES-GCM) of a UTF8 Message
public static SimpleDecrypt ( byte encryptedMessage, byte key, int nonSecretPayloadLength ) : byte[]
encryptedMessage byte The encrypted message.
key byte The key.
nonSecretPayloadLength int Length of the optional non-secret payload.
Résultat byte[]

SimpleDecrypt() public static méthode

Simple Decryption & Authentication (AES-GCM) of a UTF8 Message
public static SimpleDecrypt ( string encryptedMessage, byte key, int nonSecretPayloadLength ) : string
encryptedMessage string The encrypted message.
key byte The key.
nonSecretPayloadLength int Length of the optional non-secret payload.
Résultat string

SimpleDecryptWithPassword() public static méthode

Simple Decryption and Authentication of a UTF8 message using a key derived from a password
Significantly less secure than using random binary keys.
Must have a password of minimum length;password
public static SimpleDecryptWithPassword ( byte encryptedMessage, string password, int nonSecretPayloadLength ) : byte[]
encryptedMessage byte The encrypted message.
password string The password.
nonSecretPayloadLength int Length of the non secret payload.
Résultat byte[]

SimpleDecryptWithPassword() public static méthode

Simple Decryption and Authentication (AES-GCM) of a UTF8 message using a key derived from a password (PBKDF2)
Significantly less secure than using random binary keys.
Encrypted Message Required!;encryptedMessage
public static SimpleDecryptWithPassword ( string encryptedMessage, string password, int nonSecretPayloadLength ) : string
encryptedMessage string The encrypted message.
password string The password.
nonSecretPayloadLength int Length of the non secret payload.
Résultat string

SimpleEncrypt() public static méthode

Simple Encryption And Authentication (AES-GCM) of a UTF8 string.
Adds overhead of (Optional-Payload + BlockSize(16) + Message + HMac-Tag(16)) * 1.33 Base64
public static SimpleEncrypt ( byte secretMessage, byte key, byte nonSecretPayload = null ) : byte[]
secretMessage byte The secret message.
key byte The key.
nonSecretPayload byte Optional non-secret payload.
Résultat byte[]

SimpleEncrypt() public static méthode

Simple Encryption And Authentication (AES-GCM) of a UTF8 string.
Adds overhead of (Optional-Payload + BlockSize(16) + Message + HMac-Tag(16)) * 1.33 Base64
Secret Message Required!;secretMessage
public static SimpleEncrypt ( string secretMessage, byte key, byte nonSecretPayload = null ) : string
secretMessage string The secret message.
key byte The key.
nonSecretPayload byte Optional non-secret payload.
Résultat string

SimpleEncryptWithPassword() public static méthode

Simple Encryption And Authentication (AES-GCM) of a UTF8 String using key derived from a password.
Significantly less secure than using random binary keys. Adds additional non secret payload for key generation parameters.
Must have a password of minimum length;password
public static SimpleEncryptWithPassword ( byte secretMessage, string password, byte nonSecretPayload = null ) : byte[]
secretMessage byte The secret message.
password string The password.
nonSecretPayload byte The non secret payload.
Résultat byte[]

SimpleEncryptWithPassword() public static méthode

Simple Encryption And Authentication (AES-GCM) of a UTF8 String using key derived from a password (PBKDF2).
Significantly less secure than using random binary keys. Adds additional non secret payload for key generation parameters.
public static SimpleEncryptWithPassword ( string secretMessage, string password, byte nonSecretPayload = null ) : string
secretMessage string The secret message.
password string The password.
nonSecretPayload byte The non secret payload.
Résultat string

Property Details

Iterations public_oe static_oe property

public static int Iterations
Résultat int

KeyBitSize public_oe static_oe property

public static int KeyBitSize
Résultat int

MacBitSize public_oe static_oe property

public static int MacBitSize
Résultat int

MinPasswordLength public_oe static_oe property

public static int MinPasswordLength
Résultat int

NonceBitSize public_oe static_oe property

public static int NonceBitSize
Résultat int

SaltBitSize public_oe static_oe property

public static int SaltBitSize
Résultat int