hcrypto.cipher
Class CipherEngine
java.lang.Object
hcrypto.cipher.CipherEngine
- Direct Known Subclasses:
- BlockCipher
public abstract class CipherEngine
- extends java.lang.Object
Defines the interface
for the Cipher class. All of the methods in this class must be
implemented by a provider who wishes to provide an
implementation of a particular cipher algorithm.
The Cipher class encapsulates an instance of this class. To
create a Cipher instance, an application would use the
Cipher.getInstance(String algorithm) factory method,
where algorithm provides the name of the cipher algorithm
-- e.g., "Caesar", * "Playfair", and so on.
For example, here's sample code for instantiating and using a
Caesar cipher:
Cipher cipher = Cipher.getInstance("Caesar");
HistoricalKey key = HistoricalKey.getInstance("Caesar", cipher.getProvider());
key.init("55/printable");
cipher.init(key);
String c1encrypt = cipher.encrypt(secret);
The Cipher.getInstance() method searches the provider list for an
implementation of Caesar cipher and will throw a "No such algorithm"
exception if none is found. Details on creating an algorithm-dependent
key for the cipher are described in the documentation of
HistoricalKey class.
See also:
Cipher
HistoricalKey
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CipherEngine
public CipherEngine()
getAlphabetRangeOptions
public java.lang.String getAlphabetRangeOptions()