Oberon || Library || Module Index || Search Engine || Definition || Module
TYPE Cipher = POINTER TO CipherRec; TYPE CipherRec = RECORD (Ciphers.CipherRec) END; PROCEDURE Init (key: Cipher; if: Ciphers.Interface; inLength, outLength: INTEGER); PROCEDURE GetInLength (key: Cipher) : INTEGER; PROCEDURE GetOutLength (key: Cipher) : INTEGER; PROCEDURE EncryptBlock (in: Streams.Stream; key: Cipher; out: Streams.Stream) : BOOLEAN; PROCEDURE DecryptBlock (in: Streams.Stream; key: Cipher; out: Streams.Stream) : BOOLEAN;
Init connects the block cipher key with the interface if (see Ciphers). Besides it sets the corresponding input and output block lengths for key which must be positive.
GetInLength returns the length of an input block for the cipher key. GetOutLength does the same for the output block.
EncryptBlock and DecryptBlock work much the same like Ciphers.Encrypt and Ciphers.Decrypt but instead of dealing with whole streams these procedures operate only on a single block.
Oberon || Library || Module Index || Search Engine || Definition || Module