|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.ecore.resource.impl.AESCipherImpl
public class AESCipherImpl
EMF implementation for the URIConverter.Cipher interface using
the AES encryption algorithm.
This shows how this class can be used:
Map options = new HashMap();
options.put(Resource.OPTION_CIPHER,
new AESCipherImpl("12345")); // "That's amazing! I've got the same combination on my luggage!"
resource.save(options);
resource.load(options);
| Constructor Summary | |
|---|---|
AESCipherImpl(java.lang.String password)
|
|
| Method Summary | |
|---|---|
java.io.InputStream |
decrypt(java.io.InputStream in)
Decrypts the specified input stream. |
java.io.OutputStream |
encrypt(java.io.OutputStream outputStream)
Encrypts the specified output stream. |
void |
finish(java.io.InputStream in)
This method is invoked after the decrypted input stream is used allowing the Cipher implementation to do any maintenance work required, such as flushing internal cache. |
void |
finish(java.io.OutputStream out)
This method is invoked after the encrypted output stream is used allowing the Cipher implementation to do any maintenance work required, such as flushing an internal cache. |
int |
getKeysize()
|
void |
setKeysize(int keysize)
Sets the keysize to be used when creating the AES key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AESCipherImpl(java.lang.String password)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public void setKeysize(int keysize)
Sets the keysize to be used when creating the AES key. Using anything larger than 128 may make the data file non-portable.
The keysize cannot be changed after this Cipher is used.
keysize - public int getKeysize()
public java.io.OutputStream encrypt(java.io.OutputStream outputStream)
throws java.lang.Exception
URIConverter.Cipher
encrypt in interface URIConverter.Cipherjava.lang.Exception
public void finish(java.io.OutputStream out)
throws java.lang.Exception
URIConverter.Cipher
finish in interface URIConverter.Cipherout - the encrypted stream returned by URIConverter.Cipher.encrypt(OutputStream).
java.lang.Exception
public java.io.InputStream decrypt(java.io.InputStream in)
throws java.lang.Exception
URIConverter.Cipher
decrypt in interface URIConverter.Cipherjava.lang.Exception
public void finish(java.io.InputStream in)
throws java.lang.Exception
URIConverter.Cipher
finish in interface URIConverter.Cipherin - the stream returned by URIConverter.Cipher.decrypt(InputStream).
java.lang.Exception
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||