|
Oracle Security Developer Tools Crypto Java API Reference 10g (10.1.4.0.1) B28171-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.core.Coder
oracle.security.crypto.core.Cipher
oracle.security.crypto.core.NullCipher
A stream cipher that does not do any encoding.
Field Summary |
Fields inherited from class oracle.security.crypto.core.Cipher |
CBC, decryptionKey, ECB, encryptionKey, key, mode, NULL_PADDING, PKCS5_PADDING, rbs |
Constructor Summary | |
NullCipher() |
Method Summary | |
java.lang.String |
algName() Returns "NullCipher". |
int |
blockSize() Deprecated. Use getBlockSize() instead. |
byte[] |
decrypt(byte[] bytes, int offset, int length, boolean unpad) A literal copy of bytes with no encryption/decryption. |
void |
decrypt(byte[] bytes, int offset, int length, byte[] output, int outOff) A literal copy of bytes with no encryption/decryption. |
void |
decryptOp(byte[] in, int inOff, byte[] out, int outOff) Deprecated. Use a decrypt method instead. |
byte[] |
encrypt(byte[] bytes, int offset, int length, boolean pad) A literal copy of bytes with no encryption/decryption. |
void |
encrypt(byte[] bytes, int offset, int length, byte[] output, int outOff) A literal copy of bytes with no encryption/decryption. |
void |
encryptOp(byte[] in, int inOff, byte[] out, int outOff) Deprecated. Use an encrypt method instead. |
void |
erase() Erases any sensitive information (such as buffers and subkey tables) stored in this cipher object. |
AlgorithmIdentifier |
getAlgID() Always returns null . |
int |
getBlockSize() Returns the block size of the cipher, or 0 if the cipher is not a BlockCipher. |
void |
initialize(AlgorithmIdentifier algID, Key key) Does nothing |
void |
setAlgID(AlgorithmIdentifier algID) Deprecated. Use an initialize method. |
Methods inherited from class oracle.security.crypto.core.Cipher |
assertDecryption, assertEncryption, cloneKey, decodeOp, decrypt, decrypt, decrypt, decryptOp, encodeOp, encrypt, encrypt, encrypt, encryptOp, getDecryptionKey, getEncryptionKey, getInstance, getInstance, getInstance, getInstance, getInstance, getIV, getKey, getMode, getPadding, getPaddingID, initialize, pad, releaseOp, setDecryptionKey, setEncryptionKey, setIV, setKey, setMode, setPadding, setRandomBitsSource, unpad
|
Methods inherited from class oracle.security.crypto.core.Coder |
decode, decode, encode, encode, initialize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NullCipher()
Method Detail |
public void initialize(AlgorithmIdentifier algID, Key key) throws AlgorithmIdentifierException, InvalidKeyException, CipherException
initialize
in class Cipher
algID
- is the AlgorithmIdentifier whose params will be used to configure the cipher.key
- is the SymmetricKey instance that will be cloned and used by the cipher internally. The internal instance will be erased when Cipher.erase()
is called.AlgorithmIdentifierException
- is thrown if the algID's OID isn't valid for the Cipher instance being initialized or if the params are not valid for the algID's OID.InvalidKeyException
- is never thrown because the key is never used.CipherException
- is thrown if there is a problem initializing the Cipher.public java.lang.String algName()
algName
in class Coder
public void setAlgID(AlgorithmIdentifier algID) throws AlgorithmIdentifierException
setAlgID
in class Cipher
AlgorithmIdentifierException
public AlgorithmIdentifier getAlgID()
null
.getAlgID
in class Cipher
public byte[] encrypt(byte[] bytes, int offset, int length, boolean pad) throws CipherException
encrypt
in class Cipher
bytes
- buffer in which data to be encrypted is stored.offset
- offset within buffer of the start of the data.length
- the length of the data.pad
- true if padding is to be used, false otherwise.CipherException
- is thrown if the Cipher was not initialized, if the Cipher was used for decryption without being re-initialized, if the data is not a multiple of the block size and no padding is specified, or if an error occurred during the encryption process.public void encrypt(byte[] bytes, int offset, int length, byte[] output, int outOff) throws CipherException
encrypt
in class Cipher
bytes
- array of bytes to encryptoffset
- offset of the start of data to encryptlength
- the length of the data to encryptoutput
- array to place the encrypted bytesoutOff
- offset of the start of the encrypted bytesCipherException
- is thrown if the Cipher was not initialized, if the Cipher was used for decryption without being re-initialized, if the data is not a multiple of the block size, or if an error occurred during the encryption process.public void encryptOp(byte[] in, int inOff, byte[] out, int outOff) throws CipherException
Implementors must ensure that this method works correctly even if the 'in' and 'out' buffers coincide.
encryptOp
in class Cipher
in
- buffer in which data to be encrypted is storedinOff
- offset within input buffer of the start of dataout
- buffer to place the encrypted bytes inoutOff
- offset within output buffer where the encrypted bytes will be storedCipherException
- is thrown if the Cipher is not initialized, length of data is not equal to the block size, etc.public byte[] decrypt(byte[] bytes, int offset, int length, boolean unpad) throws CipherException
decrypt
in class Cipher
bytes
- Buffer in which data to be decrypted is stored.offset
- Offset within buffer of the start of data.length
- The length of the dataunpad
- specifies whether the plaintext should have padding removed.CipherException
- is thrown if the Cipher was not initialized, if the Cipher was used for encryption without being re-initialized, if the data is not a multiple of the block size and no padding is specified, or if an error occurred during the decryption process.public void decrypt(byte[] bytes, int offset, int length, byte[] output, int outOff) throws CipherException
decrypt
in class Cipher
bytes
- array of bytes to decryptoffset
- offset of the start of the data to decryptlength
- the length of the data to decryptoutput
- array to place the decrypted bytesoutOff
- offset of the start of the decrypted bytesCipherException
- is thrown if the Cipher was not initialized, if the Cipher was used for encryption without being re-initialized, if the data is not a multiple of the block size, or if an error occurred during the decryption process.public void decryptOp(byte[] in, int inOff, byte[] out, int outOff) throws CipherException
Implementors must ensure that this method works correctly even if the 'in' and 'out' buffers coincide.
decryptOp
in class Cipher
in
- buffer in which data to be decrypted is stored.inOff
- offset within input buffer of the start of data.out
- buffer to place the decrypted bytes inoutOff
- offset within output buffer where the encrypted bytes will be stored.CipherException
- is thrown if the Cipher is not initialized, length of data is not equal to the block size, etc.public void erase()
Cipher
erase
in class Cipher
public int blockSize()
getBlockSize()
instead.blockSize
in class Cipher
public int getBlockSize()
Cipher
getBlockSize
in class Cipher
|
Oracle Security Developer Tools Crypto Java API Reference 10g (10.1.4.0.1) B28171-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |