1 package org.bouncycastle.crypto; 2 3 public interface Wrapper 4 { init(boolean forWrapping, CipherParameters param)5 public void init(boolean forWrapping, CipherParameters param); 6 7 /** 8 * Return the name of the algorithm the wrapper implements. 9 * 10 * @return the name of the algorithm the wrapper implements. 11 */ getAlgorithmName()12 public String getAlgorithmName(); 13 wrap(byte[] in, int inOff, int inLen)14 public byte[] wrap(byte[] in, int inOff, int inLen); 15 unwrap(byte[] in, int inOff, int inLen)16 public byte[] unwrap(byte[] in, int inOff, int inLen) 17 throws InvalidCipherTextException; 18 } 19