SENxContext Class

A security context class that provides encryption and decryption services.

public class SENxContext


:small-blue-diamond:SENxContext(CryptoAlgorithm crypto, HashAlgorithm hash)Initializes a SENxContext instance using the specified CryptoAlgorithm (cipher) and HashAlgorithm.


ErrorContains the result/error of the last operation.
ErrorMessageContains the error message of the last operation.
HasPrivateKeyA bool indicating whether a private key has been loaded.
HasPublicKeyA bool indicating whether a public key has been loaded.
KeySizeAn integer representing the key size (in bits) of the currently loaded key.


:small-blue-diamond:FromCryptogram(byte[] cryptogram)Creates a SENxContext instance from the Cryptogram byte array parameter.
:small-blue-diamond:Decrypt(byte[] cryptogram)Decrypts the array of bytes representing the cryptogram into its original contents.
:small-blue-diamond:Dispose()Disposes the SENxContext instance. This method also implicitly calls the FreeContext() method.
:small-blue-diamond:Encrypt(byte[] clearText)Encrypts the array of bytes into a cryptogram that may be transmitted using the EtherFaxClient SendFax() method.
:small-blue-diamond:FreeContext()Releases all resources allocated by this instance.
:small-blue-diamond:IsCryptogram(byte[] cryptogram)Returns a bool if the byte[] array contains a valid cryptogram.
:small-blue-diamond:LoadKeyFromBuffer(byte[] keyBuffer)Loads the public or private key (PEM) from a byte[] buffer.
:small-blue-diamond:LoadKeyFromFile(string keyFIle)Loads the public or private key (PEM) from a file.