id: tecbciphermode title: TECBCipherMode
ECB Cipher Mode
A symmetric mode block cipher.
Method Start:Int(cipher:TCipher, key:Byte Ptr, keylen:Int, numRounds:Int)Initializes the cipher mode.
CRYPT_OK if the cipher initialized correctly, otherwise, returns an error code.
Method Encrypt:Int(pt:Byte Ptr, ct:Byte Ptr, length:UInt)Encrypts the plaintext pt of length to ct.
length must be a multiple of the cipher block size, otherwise you must manually pad the end of your message (either with zeroes or with whatever your protocol requires).
CRYPT_OK on success.
Method Decrypt:Int(ct:Byte Ptr, pt:Byte Ptr, length:UInt)Decrypts the ciphertext ct of length to pt.
CRYPT_OK on success.
Method Done:Int()Terminates the cipher stream.