public class CryptTool extends Object
| Constructor and Description |
|---|
CryptTool(byte[] key)
Create a new crypttool with the binary given key.
|
CryptTool(String key)
Create a new crypttool with the given key.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
chiffreToId(String chiffre)
Restore Numerical ID from Chiffre.
|
byte[] |
decrypt(byte[] toDecrypt) |
void |
decryptBuffer(byte[] buffer)
Decrypts specified byte array.
|
String |
decryptFromHex(String toDecrypt) |
String |
decryptFromHexTrim(String toDecrypt) |
Map<String,String> |
decryptParameterMap(String str)
Decrypts a previously encoded parameter map and returns it as map of key-value pairs.
|
byte[] |
encrypt(String toEncrypt)
Returns a byte array containing the encrypted version of the string.
|
void |
encryptBuffer(byte[] buffer)
Encrypts specified byte array.
|
String |
encryptParameterMap(Map<String,String> parameters)
Encrypts a map of key value pairs to a single string to use as html parameter or similar.
|
String |
encryptToHex(String toEncrypt)
Returns a HEX version of the encrypted string.
|
static String |
idToChiffre(String id)
Converts Numerical ID to Chiffre: string from letters and digits 8 symbols length.
|
public CryptTool(String key)
key - the key to use for en- and decode.public CryptTool(byte[] key)
key - the key to use for en- and decode.public byte[] encrypt(String toEncrypt)
toEncrypt - public String encryptToHex(String toEncrypt)
toEncrypt - the string to encrypt.public byte[] decrypt(byte[] toDecrypt)
public String encryptParameterMap(Map<String,String> parameters)
parameters - a map with parameters.public Map<String,String> decryptParameterMap(String str)
str - the string to decode.public static String idToChiffre(String id)
id - to convertpublic static String chiffreToId(String chiffre)
chiffre - public void encryptBuffer(byte[] buffer)
buffer - byte array to encrypt.public void decryptBuffer(byte[] buffer)
buffer - byte array to decrypt.Copyright © 2010-2014 anotheria.net. All Rights Reserved.