bees.core.security
Class Cipher
java.lang.Object
|
+--bees.core.security.Cipher
- public class Cipher
- extends java.lang.Object
Cipher is a thin veneer over the standard javax.crypto.Cipher class that
uses bees.core.security classes.
Constructor Summary |
Cipher(java.lang.String transformation)
|
Method Summary |
byte[] |
doFinal()
|
byte[] |
doFinal(byte[] input)
|
int |
doFinal(byte[] output,
int outputOffset)
|
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()
|
byte[] |
getIV()
|
int |
getOutputSize(int inputLength)
|
java.security.AlgorithmParameters |
getParameters()
|
void |
init(int opmode,
KeySpec key)
|
void |
init(int opmode,
KeySpec key,
java.security.AlgorithmParameters params)
|
void |
init(int opmode,
KeySpec key,
java.security.spec.AlgorithmParameterSpec params)
|
void |
init(int opmode,
KeySpec key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom sr)
|
void |
init(int opmode,
KeySpec key,
java.security.AlgorithmParameters params,
java.security.SecureRandom sr)
|
void |
init(int opmode,
KeySpec key,
java.security.SecureRandom sr)
|
java.lang.String |
toString()
|
KeySpec |
unwrap(byte[] wrappedKey,
java.lang.String wrappedKeyAlgorithm,
int wrappedKeyType)
|
byte[] |
update(byte[] input)
|
byte[] |
update(byte[] input,
int inputOffset,
int inputLen)
|
int |
update(byte[] input,
int inputOffset,
int inputLen,
byte[] output)
|
int |
update(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
|
byte[] |
wrap(KeySpec key)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DECRYPT_PERMISSION
public static final Permission DECRYPT_PERMISSION
- Permission to use this key for decryption.
ENCRYPT_PERMISSION
public static final Permission ENCRYPT_PERMISSION
- Permission to use this key for encryption.
DECRYPT_MODE
public static final int DECRYPT_MODE
ENCRYPT_MODE
public static final int ENCRYPT_MODE
PRIVATE_KEY
public static final int PRIVATE_KEY
PUBLIC_KEY
public static final int PUBLIC_KEY
SECRET_KEY
public static final int SECRET_KEY
UNWRAP_MODE
public static final int UNWRAP_MODE
WRAP_MODE
public static final int WRAP_MODE
Cipher
public Cipher(java.lang.String transformation)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException
getAlgorithm
public java.lang.String getAlgorithm()
getBlockSize
public int getBlockSize()
getOutputSize
public int getOutputSize(int inputLength)
getIV
public byte[] getIV()
getParameters
public java.security.AlgorithmParameters getParameters()
init
public void init(int opmode,
KeySpec key)
throws java.security.InvalidKeyException
init
public void init(int opmode,
KeySpec key,
java.security.SecureRandom sr)
throws java.security.InvalidKeyException
init
public void init(int opmode,
KeySpec key,
java.security.spec.AlgorithmParameterSpec params)
throws java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException
init
public void init(int opmode,
KeySpec key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom sr)
throws java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException
init
public void init(int opmode,
KeySpec key,
java.security.AlgorithmParameters params)
throws java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException
init
public void init(int opmode,
KeySpec key,
java.security.AlgorithmParameters params,
java.security.SecureRandom sr)
throws java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException
update
public byte[] update(byte[] input)
throws java.lang.IllegalStateException
update
public byte[] update(byte[] input,
int inputOffset,
int inputLen)
throws java.lang.IllegalStateException
update
public int update(byte[] input,
int inputOffset,
int inputLen,
byte[] output)
throws javax.crypto.ShortBufferException,
java.lang.IllegalStateException
update
public int update(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws javax.crypto.ShortBufferException,
java.lang.IllegalStateException
doFinal
public byte[] doFinal()
throws java.lang.IllegalStateException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
doFinal
public int doFinal(byte[] output,
int outputOffset)
throws java.lang.IllegalStateException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.ShortBufferException,
javax.crypto.BadPaddingException
doFinal
public byte[] doFinal(byte[] input)
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
doFinal
public int doFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output)
throws java.lang.IllegalStateException,
javax.crypto.ShortBufferException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
doFinal
public int doFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws java.lang.IllegalStateException,
javax.crypto.ShortBufferException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
wrap
public byte[] wrap(KeySpec key)
throws java.lang.IllegalStateException,
javax.crypto.IllegalBlockSizeException,
java.security.InvalidKeyException
unwrap
public KeySpec unwrap(byte[] wrappedKey,
java.lang.String wrappedKeyAlgorithm,
int wrappedKeyType)
throws java.security.NoSuchAlgorithmException,
java.lang.IllegalStateException,
java.security.InvalidKeyException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/