gnu.crypto.pad
public abstract class BasePad extends Object implements IPad
An abstract class to facilitate implementing padding algorithms.
Version: $Revision: 1.6 $
| Field Summary | |
|---|---|
| protected int | blockSize The block size, in bytes, for this instance. |
| protected String | name The canonical name prefix of the padding algorithm. |
| Constructor Summary | |
|---|---|
| protected | BasePad(String name) Trivial constructor for use by concrete subclasses. |
| Method Summary | |
|---|---|
| void | init(int bs) |
| String | name() |
| abstract byte[] | pad(byte[] in, int off, int len) |
| void | reset() |
| boolean | selfTest() |
| abstract void | setup() If any additional checks or resource setup must be done by the subclass, then this is the hook for it. |
| abstract int | unpad(byte[] in, int off, int len) |
If any additional checks or resource setup must be done by the subclass, then this is the hook for it. This method will be called before the BasePad method returns.