SENxContext Class

A security context class that provides encryption and decryption services.

public class SENxContext


๐Ÿ”น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.


๐Ÿ”น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.