public final class CryptoUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
decrypt(byte[] key,
String content)
Decrypts the content passed-in.
|
static String |
encrypt(byte[] key,
String content)
Encrypts the content passed-in.
|
static String |
endpointToken(String uaid,
String channelId,
byte[] key) |
static byte[] |
secretKey(String password,
byte[] salt) |
public static String encrypt(byte[] key, String content) throws Exception
key - the key used for the underlying cypher.content - the content to encryptedString the encoded content as base64 encoded string.Exceptionpublic static String decrypt(byte[] key, String content) throws Exception
key - the key used for the underlying cypher.content - the content to decrypted.String the descrypted content as a String.InvalidKeyExceptionExceptionpublic static byte[] secretKey(String password, byte[] salt)
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.