SENxContext Class
A security context class that provides encryption and decryption services.
public class SENxContext
CONSTRUCTORS
Name | Description | |
---|---|---|
🔹 | SENxContext(CryptoAlgorithm crypto, HashAlgorithm hash) | Initializes a SENxContext instance using the specified CryptoAlgorithm (cipher) and HashAlgorithm. |
PROPERTIES
Name | Description | |
---|---|---|
Error | Contains the result/error of the last operation. | |
ErrorMessage | Contains the error message of the last operation. | |
HasPrivateKey | A bool indicating whether a private key has been loaded. | |
HasPublicKey | A bool indicating whether a public key has been loaded. | |
KeySize | An integer representing the key size (in bits) of the currently loaded key. |
METHODS
Name | Description | |
---|---|---|
🔹 | FromCryptogram(byte[] cryptogram) | Creates a SENxContext instance from the Cryptogram byte array parameter. |
🔹 | Decrypt(byte[] cryptogram) | Decrypts the array of bytes representing the cryptogram into its original contents. |
🔹 | Dispose() | Disposes the SENxContext instance. This method also implicitly calls the FreeContext() method. |
🔹 | Encrypt(byte[] clearText) | Encrypts the array of bytes into a cryptogram that may be transmitted using the EtherFaxClient SendFax() method. |
🔹 | FreeContext() | Releases all resources allocated by this instance. |
🔹 | IsCryptogram(byte[] cryptogram) | Returns a bool if the byte[] array contains a valid cryptogram. |
🔹 | LoadKeyFromBuffer(byte[] keyBuffer) | Loads the public or private key (PEM) from a byte[] buffer. |
🔹 | LoadKeyFromFile(string keyFIle) | Loads the public or private key (PEM) from a file. |
Updated almost 7 years ago