intarsys runtime library

de.intarsys.tools.crypto
Class Cryptdec

java.lang.Object
  extended by de.intarsys.tools.crypto.Cryptdec
All Implemented Interfaces:
ICryptdec
Direct Known Subclasses:
PBCryptdec

public abstract class Cryptdec
extends Object
implements ICryptdec


Constructor Summary
Cryptdec(String id, byte[] iv)
           
 
Method Summary
 byte[] decrypt(byte[] bytes)
          Decrypt a byte array.
 byte[] encrypt(byte[] bytes)
          Encrypt a byte array.
 String getId()
          A unique id for the ICryptdec
 byte[] getInitializationVector()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cryptdec

public Cryptdec(String id,
                byte[] iv)
Method Detail

decrypt

public byte[] decrypt(byte[] bytes)
               throws IOException
Decrypt a byte array.

Specified by:
decrypt in interface ICryptdec
Parameters:
bytes -
Returns:
The decrypted representation of bytes
Throws:
IOException

encrypt

public byte[] encrypt(byte[] bytes)
               throws IOException
Encrypt a byte array.

Specified by:
encrypt in interface ICryptdec
Parameters:
bytes -
Returns:
The encrypted representation of bytes
Throws:
IOException

getId

public String getId()
Description copied from interface: ICryptdec
A unique id for the ICryptdec

Specified by:
getId in interface ICryptdec
Returns:
A unique id for the ICryptdec

getInitializationVector

public byte[] getInitializationVector()

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.