org.openptk.crypto
Class Crypto
java.lang.Object
org.openptk.crypto.Crypto
- All Implemented Interfaces:
- CryptoIF
- Direct Known Subclasses:
- KeyGenCrypto, PBECrypto
public abstract class Crypto
- extends java.lang.Object
- implements CryptoIF
Abstract class that implements the CryptoIF interface
Provides foundation "common" methods.
- Author:
- Scott Fehrman, Sun Microsystems, Inc.
Constructor Summary |
Crypto()
initialize the _encoder and _decoder. |
Method Summary |
java.lang.String |
decrypt(java.lang.String input)
|
java.lang.String |
encrypt(java.lang.String input)
|
java.lang.String |
getId()
|
static java.lang.String[] |
getImplementations()
|
static void |
main(java.lang.String[] args)
|
void |
setId(java.lang.String id)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_decoder
protected sun.misc.BASE64Decoder _decoder
_decryptCipher
protected javax.crypto.Cipher _decryptCipher
_encoder
protected sun.misc.BASE64Encoder _encoder
_encryptCipher
protected javax.crypto.Cipher _encryptCipher
STRING_ENCODING
protected java.lang.String STRING_ENCODING
Crypto
public Crypto()
- initialize the _encoder and _decoder.
decrypt
public final java.lang.String decrypt(java.lang.String input)
throws CryptoException
- Specified by:
decrypt
in interface CryptoIF
- Parameters:
input
- the encrypted value
- Returns:
- string the clear text value
- Throws:
CryptoException
encrypt
public final java.lang.String encrypt(java.lang.String input)
throws CryptoException
- Specified by:
encrypt
in interface CryptoIF
- Parameters:
input
- the clear text value
- Returns:
- string the encrypted value
- Throws:
CryptoException
getId
public final java.lang.String getId()
- Specified by:
getId
in interface CryptoIF
- Returns:
- String
getImplementations
public static java.lang.String[] getImplementations()
- Returns:
- array of Strings, implementations
main
public static void main(java.lang.String[] args)
- Parameters:
args
- optional arguments
setId
public final void setId(java.lang.String id)
- Specified by:
setId
in interface CryptoIF
- Parameters:
id
-
View/submit a bug or feature
For further API reference and developer documentation, see www.openptk.org.
That documentation contains more detailed, developer-targeted descriptions,
definitions of terms, workarounds, and working code examples.
Copyright (C) 2008-2012, Project OpenPTK. All Rights Reserved