de.bb.security
Class Iso9796

java.lang.Object
  |
  +--de.bb.security.Iso9796

public class Iso9796
extends java.lang.Object


Constructor Summary
Iso9796()
           
 
Method Summary
static byte[] pad(byte[] in, int inbits, int ks)
          pad an input data according to ISO9796 to fit the specified keylength
static byte[] unpad(byte[] in)
          unpad an input data according to ISO9796
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Iso9796

public Iso9796()
Method Detail

pad

public static byte[] pad(byte[] in,
                         int inbits,
                         int ks)
pad an input data according to ISO9796 to fit the specified keylength
Parameters:
in - - input data
ks - - the length of the modulo
Returns:
a new allocated byte array containing the padded data

unpad

public static byte[] unpad(byte[] in)
unpad an input data according to ISO9796
Parameters:
in - - input data
Returns:
a new allocated byte array containing the unpadded data or null on error