IRawBlockCipher interface
Contents
- Introduction to the Library
- Basic support package (com.kryptel.bslx)
- Kryptel API Commons package (com.kryptel)
- Cipher package (com.kryptel.cipher)
- Compressor package (com.kryptel.compressor)
- Exceptions package (com.kryptel.exceptions)
- Hash function package (com.kryptel.hash_function)
- MAC function package (com.kryptel.mac)
- Key-related functions (com.kryptel.key)
- Silver Key engine (com.kryptel.silver_key)
- Kryptel encrypted storage (com.kryptel.storage)
Declaration
package com.kryptel.cipher; public interface IRawBlockCipher { void EncryptBlock(byte[] dst, int to, byte[] src, int from) throws Exception; void DecryptBlock(byte[] dst, int to, byte[] src, int from) throws Exception; }
Description
This interface allows encrypting or decryping a single block of data. No block chaining is used – these methods simply call the underlying cipher imlementation functions EncryptBasicBlock and DecryptBasicBlock (see Adding a New Cipher).
EncryptBlock
void EncryptBlock(byte[] dst, int to, byte[] src, int from) throws Exception;
Encrypt block in src at position from and store the encrypted data to dst at position to. The memory areas src/from and dst/to may overlap.
DecryptBlock
void DecryptBlock(byte[] dst, int to, byte[] src, int from) throws Exception;
Decrypt block in src at position from and store the decrypted data to dst at position to. The memory areas src/from and dst/to may overlap.