public class SimpleCrypto extends Object
String crypto = SimpleCrypto.encrypt(masterpassword, cleartext) ... String cleartext = SimpleCrypto.decrypt(masterpassword, crypto)
Constructor and Description |
---|
SimpleCrypto() |
Modifier and Type | Method and Description |
---|---|
static String |
decrypt(String seed,
String encrypted) |
static String |
encrypt(String seed,
String cleartext) |
static String |
fromHex(String hex) |
static SecretKey |
generateKey() |
static byte[] |
toByte(String hexString) |
static String |
toHex(byte[] buf) |
static String |
toHex(String txt) |
public static String encrypt(String seed, String cleartext) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, IllegalArgumentException, NoSuchProviderException
public static String decrypt(String seed, String encrypted) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, IllegalArgumentException, NoSuchProviderException
public static SecretKey generateKey() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static byte[] toByte(String hexString)
public static String toHex(byte[] buf)
Copyright © 2003–2016 eXo Platform SAS. All rights reserved.