Loading…

Kryptel/Java

IRawBlockCipher interface

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.