public class Crypto extends Object
| Constructor and Description |
|---|
Crypto() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
aes(byte[] key,
byte[] data,
boolean encrypt) |
static String |
bytesAsText(byte[] bytes) |
static Cipher |
cipher(String transformation) |
static byte[] |
decrypt(byte[] dataToDecrypt) |
static byte[] |
decrypt(String secret,
byte[] dataToDecrypt) |
static MessageDigest |
digest(String algorithm) |
static byte[] |
encrypt(byte[] dataToEncrypt) |
static byte[] |
encrypt(String secret,
byte[] dataToEncrypt) |
static String |
md5(byte[] bytes) |
static String |
md5(String data) |
static byte[] |
md5Bytes(byte[] bytes) |
static String |
secret() |
static String |
sha1(byte[] bytes) |
static String |
sha1(String data) |
static byte[] |
sha1Bytes(byte[] bytes) |
static String |
sha512(byte[] bytes) |
static String |
sha512(String data) |
static byte[] |
sha512Bytes(byte[] bytes) |
public static MessageDigest digest(String algorithm)
public static String bytesAsText(byte[] bytes)
public static byte[] md5Bytes(byte[] bytes)
public static String md5(byte[] bytes)
public static byte[] sha1Bytes(byte[] bytes)
public static String sha1(byte[] bytes)
public static byte[] sha512Bytes(byte[] bytes)
public static String sha512(byte[] bytes)
public static String secret()
public static byte[] aes(byte[] key,
byte[] data,
boolean encrypt)
public static byte[] encrypt(String secret, byte[] dataToEncrypt)
public static byte[] decrypt(String secret, byte[] dataToDecrypt)
public static byte[] encrypt(byte[] dataToEncrypt)
public static byte[] decrypt(byte[] dataToDecrypt)
Copyright © 2014–2015 Nikolche Mihajlovski and contributors. All rights reserved.