OpenPetra
Free Administration Software for Non-Profits
Ict.Common.IO.EncryptionRijndael Class Reference

Static Public Member Functions

static byte[] ReadSecretKey (string ASecretKeyFile)
 the key is stored as a base64 string to make it easier to handle the key; this method returns the clear version of the key to be used with encrypt and decrypt functions More...
 
static bool CreateSecretKey (string ASecretKeyFile)
 store a key into a text file More...
 
static bool Encrypt (byte[] ASecretKey, string AMessage, out string AEncryptedMessage, out string AInitializationVector)
 
static string Decrypt (byte[] ASecretKey, string AEncryptedMessage, string AInitializationVector)
 decrypt an encrypted message, using the secret key and the initialization vector that was used to encrypt the message More...
 
static Stream Encrypt (byte[] AEncryptionKey, Stream source, out byte[] AEncryptionIV)
 Encrypt a stream, create an initialization vector, which is transmitted with the message More...
 
static Stream Decrypt (byte[] AEncryptionKey, Stream source, byte[] AEncryptionIV)
 Decrypt a stream, using the initialization vector, which was transmitted with the message. More...
 
static string GetEncryptionName ()
 the name of the encryption algorithm More...
 

Detailed Description

contains functions to deal with encryption and decryption; see also BuildTools/GenerateEncryptionKey, and Petra/Shared/RemotingSinks

Member Function Documentation

◆ CreateSecretKey()

static bool Ict.Common.IO.EncryptionRijndael.CreateSecretKey ( string  ASecretKeyFile)
inlinestatic

store a key into a text file

◆ Decrypt() [1/2]

static Stream Ict.Common.IO.EncryptionRijndael.Decrypt ( byte[]  AEncryptionKey,
Stream  source,
byte[]  AEncryptionIV 
)
inlinestatic

Decrypt a stream, using the initialization vector, which was transmitted with the message.

◆ Decrypt() [2/2]

static string Ict.Common.IO.EncryptionRijndael.Decrypt ( byte[]  ASecretKey,
string  AEncryptedMessage,
string  AInitializationVector 
)
inlinestatic

decrypt an encrypted message, using the secret key and the initialization vector that was used to encrypt the message

◆ Encrypt() [1/2]

static Stream Ict.Common.IO.EncryptionRijndael.Encrypt ( byte[]  AEncryptionKey,
Stream  source,
out byte[]  AEncryptionIV 
)
inlinestatic

Encrypt a stream, create an initialization vector, which is transmitted with the message

◆ Encrypt() [2/2]

static bool Ict.Common.IO.EncryptionRijndael.Encrypt ( byte[]  ASecretKey,
string  AMessage,
out string  AEncryptedMessage,
out string  AInitializationVector 
)
inlinestatic

encrypt a string message using a secret key that is known to both sender and recipient only; need to give the initialization vector to the recipient as well;

◆ GetEncryptionName()

static string Ict.Common.IO.EncryptionRijndael.GetEncryptionName ( )
inlinestatic

the name of the encryption algorithm

◆ ReadSecretKey()

static byte[] Ict.Common.IO.EncryptionRijndael.ReadSecretKey ( string  ASecretKeyFile)
inlinestatic

the key is stored as a base64 string to make it easier to handle the key; this method returns the clear version of the key to be used with encrypt and decrypt functions


The documentation for this class was generated from the following file: