public class Encrypter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static Encrypter |
_instance
Instance unique de l'Encrypter
|
private javax.crypto.Cipher |
cipher
Le cipher
|
private java.security.MessageDigest |
digester
Le Digester
|
private java.lang.String |
stringKey
La cle de cryptage
|
| Constructor and Description |
|---|
Encrypter()
Constructeur prive
|
| Modifier and Type | Method and Description |
|---|---|
private javax.crypto.SecretKey |
createDESSecretKey(java.lang.String keytext)
Methode de generation de cle prives sur la base d'un mot de passe
|
java.lang.String |
decryptText(java.lang.String text)
Methode de decryptage d'un texte
|
java.lang.String |
encryptText(java.lang.String text)
Methode d'encryptage d'un texte
|
static Encrypter |
getInstance()
Factory de l'Encrypter
|
java.lang.String |
hashText(java.lang.String text)
Methode de hachage d'un texte
|
private java.lang.String stringKey
private javax.crypto.Cipher cipher
private java.security.MessageDigest digester
private static Encrypter _instance
public static Encrypter getInstance()
public java.lang.String decryptText(java.lang.String text)
text - Texte a decrypterpublic java.lang.String encryptText(java.lang.String text)
text - Texte a encrypterpublic java.lang.String hashText(java.lang.String text)
text - Texte a hacherprivate javax.crypto.SecretKey createDESSecretKey(java.lang.String keytext)
keytext - Texte cleCopyright © 2018 Leadware. All Rights Reserved.