public class JavaCrypt extends Object implements CryptoAlgorithm
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CIPHER
The default cipher
|
Constructor and Description |
---|
JavaCrypt()
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
encrypt(String value)
Encrypt the supplied string with the requested cipher
|
void |
setCipher(String cipher)
Setting the actual cipher requested.
|
void |
setSeed(String seed)
This class never uses a seed, so this is just a dummy.
|
public static final String DEFAULT_CIPHER
public JavaCrypt()
public void setCipher(String cipher)
setCipher
in interface CryptoAlgorithm
cipher
- The cipher to use.CryptoAlgorithm.setCipher(java.lang.String)
public void setSeed(String seed)
setSeed
in interface CryptoAlgorithm
seed
- Seed (ignored)CryptoAlgorithm.setSeed(java.lang.String)
public String encrypt(String value) throws Exception
encrypt
in interface CryptoAlgorithm
value
- The value to be encryptedException
- An Exception of the underlying implementation.CryptoAlgorithm.encrypt(java.lang.String)
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.