public class CryptoUtil extends Object
| Constructor and Description |
|---|
CryptoUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decrypt(String encodedKey,
String encodedInput) |
static String |
decryptWithPassword(String password,
String input) |
static String |
encrypt(String encodedKey,
byte[] bytes) |
static String |
encryptWithPassword(String password,
String input) |
static String |
genAESKey() |
static Keys |
generateECKeys() |
static Keys |
generateKeys() |
static String |
genSalt(int len) |
static String |
hash(byte[] contentBytes) |
static String |
hash(String str) |
static String |
makeBlankString(int len) |
static String |
md5(byte[] bytes) |
static String |
toHex(byte[] data) |
static String |
toHex(byte[] data,
int length) |
public static String genAESKey() throws RuntimeException
RuntimeExceptionpublic static Keys generateKeys() throws RuntimeException
RuntimeExceptionpublic static Keys generateECKeys() throws RuntimeException
RuntimeExceptionpublic static String encrypt(String encodedKey, byte[] bytes) throws RuntimeException
RuntimeExceptionpublic static String encryptWithPassword(String password, String input) throws RuntimeException
RuntimeExceptionpublic static String decryptWithPassword(String password, String input) throws RuntimeException
RuntimeExceptionpublic static String decrypt(String encodedKey, String encodedInput) throws RuntimeException
RuntimeExceptionpublic static String hash(String str) throws RuntimeException
RuntimeExceptionpublic static String md5(byte[] bytes) throws RuntimeException
RuntimeExceptionpublic static String hash(byte[] contentBytes) throws RuntimeException
RuntimeExceptionpublic static String toHex(byte[] data, int length)
public static String toHex(byte[] data)
public static String makeBlankString(int len)
public static String genSalt(int len)
Copyright © 2018. All rights reserved.