org.apache.geronimo.crypto
Class AbstractEncryption
java.lang.Object
org.apache.geronimo.crypto.AbstractEncryption
- All Implemented Interfaces:
- Encryption
- Direct Known Subclasses:
- ConfiguredEncryption, SimpleEncryption
public abstract class AbstractEncryption
- extends Object
- implements Encryption
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractEncryption
public AbstractEncryption()
encrypt
public String encrypt(Serializable source)
- Gets a String which contains the Base64-encoded form of the source,
encrypted with the key from getSecretKeySpec().
- Specified by:
encrypt
in interface Encryption
- Parameters:
source
- object to encrypt
- Returns:
- encrypted object representing the source.
decrypt
public Serializable decrypt(String source)
- Given a String which is the Base64-encoded encrypted data, retrieve
the original Object.
- Specified by:
decrypt
in interface Encryption
- Parameters:
source
- the string representing the encrypted object
- Returns:
- (a copy of) the original object.
getSecretKeySpec
protected abstract SecretKeySpec getSecretKeySpec()
Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.