C# Класс R.Scheduler.Core.AESGCM

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Iterations int
KeyBitSize int
MacBitSize int
MinPasswordLength int
NonceBitSize int
SaltBitSize int

Открытые методы

Метод Описание
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.

Описание методов

NewKey() публичный статический Метод

Helper that generates a random new key on each call.
public static NewKey ( ) : byte[]
Результат byte[]

SimpleDecrypt() публичный статический Метод

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.
Результат byte[]

SimpleDecrypt() публичный статический Метод

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.
Результат string

SimpleDecryptWithPassword() публичный статический Метод

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.
Результат byte[]

SimpleDecryptWithPassword() публичный статический Метод

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.
Результат string

SimpleEncrypt() публичный статический Метод

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.
Результат byte[]

SimpleEncrypt() публичный статический Метод

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.
Результат string

SimpleEncryptWithPassword() публичный статический Метод

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.
Результат byte[]

SimpleEncryptWithPassword() публичный статический Метод

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.
Результат string

Описание свойств

Iterations публичное статическое свойство

public static int Iterations
Результат int

KeyBitSize публичное статическое свойство

public static int KeyBitSize
Результат int

MacBitSize публичное статическое свойство

public static int MacBitSize
Результат int

MinPasswordLength публичное статическое свойство

public static int MinPasswordLength
Результат int

NonceBitSize публичное статическое свойство

public static int NonceBitSize
Результат int

SaltBitSize публичное статическое свойство

public static int SaltBitSize
Результат int