com.waveset.util
Class JCECipher
java.lang.Object
com.waveset.util.Cipher
com.waveset.util.JCECipher
- public class JCECipher
- extends Cipher
Extends Cipher
to wrap an instance of
javax.crypto.Cipher
. Used when Lighthouse uses JCE
to obtain a pluggable, configured provider.
Field Summary |
static java.lang.String |
code_id
|
Method Summary |
byte[] |
doFinal(byte[] input)
|
byte[] |
doFinal(byte[] input,
int inputOffset,
int inputLen)
|
int |
doFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output)
|
int |
doFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
|
java.lang.String |
getAlgorithm()
|
int |
getBlockSize()
|
void |
init(int opmode,
java.security.Key key)
|
void |
init(int opmode,
java.security.Key key,
javax.crypto.spec.PBEParameterSpec paramSpec)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
code_id
public static final java.lang.String code_id
- See Also:
- Constant Field Values
toString
public java.lang.String toString()
init
public void init(int opmode,
java.security.Key key)
throws java.security.InvalidKeyException
- Specified by:
init
in class Cipher
- Throws:
java.security.InvalidKeyException
init
public void init(int opmode,
java.security.Key key,
javax.crypto.spec.PBEParameterSpec paramSpec)
throws java.security.InvalidKeyException,
java.security.InvalidAlgorithmParameterException
- Specified by:
init
in class Cipher
- Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithm
in class Cipher
getBlockSize
public int getBlockSize()
- Specified by:
getBlockSize
in class Cipher
doFinal
public byte[] doFinal(byte[] input)
throws java.lang.IllegalStateException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
- Specified by:
doFinal
in class Cipher
- Throws:
java.lang.IllegalStateException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
doFinal
public byte[] doFinal(byte[] input,
int inputOffset,
int inputLen)
throws java.lang.IllegalStateException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException,
javax.crypto.ShortBufferException
- Specified by:
doFinal
in class Cipher
- Throws:
java.lang.IllegalStateException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
javax.crypto.ShortBufferException
doFinal
public int doFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output)
throws java.lang.IllegalStateException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException,
javax.crypto.ShortBufferException
- Specified by:
doFinal
in class Cipher
- Throws:
java.lang.IllegalStateException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
javax.crypto.ShortBufferException
doFinal
public int doFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws java.lang.IllegalStateException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException,
javax.crypto.ShortBufferException
- Specified by:
doFinal
in class Cipher
- Throws:
java.lang.IllegalStateException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
javax.crypto.ShortBufferException