|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object velosurf.util.DESCryptograph
public class DESCryptograph
Implemenation of the cryptograph for the DES algorithm. Inspired from some code found at http://javaalmanac.com
Field Summary | |
---|---|
(package private) javax.crypto.Cipher |
dcipher
decryption cypher |
(package private) javax.crypto.Cipher |
ecipher
encryption cypher |
Constructor Summary | |
---|---|
DESCryptograph()
Constructor. |
Method Summary | |
---|---|
java.lang.String |
decrypt(java.lang.String str)
Decrypt a string. |
java.lang.String |
encrypt(java.lang.String str)
encrypt a string. |
void |
init(java.lang.String random)
initialization. |
static void |
main(java.lang.String[] args)
test method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
javax.crypto.Cipher ecipher
javax.crypto.Cipher dcipher
Constructor Detail |
---|
public DESCryptograph()
Method Detail |
---|
public void init(java.lang.String random)
init
in interface Cryptograph
random
- random stringpublic java.lang.String encrypt(java.lang.String str)
encrypt
in interface Cryptograph
str
- string to encrypt
public java.lang.String decrypt(java.lang.String str)
decrypt
in interface Cryptograph
str
- string to decrypt
public static void main(java.lang.String[] args)
args
- not used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |