public final class Encryptor extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
decrypt(byte[] encrypted)
Decrypt encrypted data using the default passphrase.
|
static String |
decrypt(byte[] encrypted,
char[] passphrase)
Decrypt an encrypted data.
|
static String |
decrypt(String encrypted)
Decrypt an encrypted string using the default passphrase.
|
static String |
decrypt(String encrypted,
char[] passphrase)
Decrypt an encrypted string.
|
static byte[] |
decryptRaw(byte[] encrypted)
Decrypt encrypted data using the default passphrase.
|
static byte[] |
decryptRaw(byte[] encrypted,
char[] passphrase)
Decrypt encrypted data.
|
static String |
encrypt(byte[] unencrypted)
Encrypt the binary data using the default passphrase.
|
static String |
encrypt(byte[] unencrypted,
char[] passphrase)
Encrypt the binary data.
|
static String |
encrypt(String unencrypted)
Encrypt the plain-text string using the default passphrase.
|
static String |
encrypt(String unencrypted,
char[] passphrase)
Encrypt the plain-text string.
|
static byte[] |
encryptRaw(byte[] unencrypted)
Encrypt the binary data using the default passphrase.
|
static byte[] |
encryptRaw(byte[] unencrypted,
char[] passphrase)
Encrypt the binary data.
|
public static String encrypt(String unencrypted)
unencrypted - The plain-text string to encryptpad(byte[], int)public static String encrypt(String unencrypted, char[] passphrase)
unencrypted - The plain-text string to encryptpassphrase - The passphrase to encrypt the data withpublic static String encrypt(byte[] unencrypted)
unencrypted - The binary data to encryptpad(byte[], int)public static String encrypt(byte[] unencrypted, char[] passphrase)
unencrypted - The binary data to encryptpassphrase - The passphrase to encrypt the data withpad(byte[], int)public static byte[] encryptRaw(byte[] unencrypted)
unencrypted - The binary data to encryptpad(byte[], int)public static byte[] encryptRaw(byte[] unencrypted,
char[] passphrase)
unencrypted - The binary data to encryptpassphrase - The passphrase to encrypt the data withpad(byte[], int)public static String decrypt(String encrypted)
encrypted - The encrypted string to decryptFailedToDecryptException - when the data was corrupt and undecryptable or when the provided decryption password was incorrect. It is impossible to know which is the actual cause.unPad(byte[])public static String decrypt(String encrypted, char[] passphrase)
encrypted - The encrypted string to decryptpassphrase - The passphrase to decrypt the string withFailedToDecryptException - when the data was corrupt and undecryptable or when the provided decryption password was incorrect. It is impossible to know which is the actual cause.unPad(byte[])public static String decrypt(byte[] encrypted)
encrypted - The encrypted data to decryptFailedToDecryptException - when the data was corrupt and undecryptable or when the provided decryption password was incorrect. It is impossible to know which is the actual cause.unPad(byte[])public static String decrypt(byte[] encrypted, char[] passphrase)
encrypted - The encrypted data to decryptpassphrase - The passphrase to decrypt the data withFailedToDecryptException - when the data was corrupt and undecryptable or when the provided decryption password was incorrect. It is impossible to know which is the actual cause.unPad(byte[])public static byte[] decryptRaw(byte[] encrypted)
encrypted - The encrypted data to decryptFailedToDecryptException - when the data was corrupt and undecryptable or when the provided decryption password was incorrect. It is impossible to know which is the actual cause.unPad(byte[])public static byte[] decryptRaw(byte[] encrypted,
char[] passphrase)
encrypted - The encrypted data to decryptpassphrase - The passphrase to decrypt the data withFailedToDecryptException - when the data was corrupt and undecryptable or when the provided decryption password was incorrect. It is impossible to know which is the actual cause.unPad(byte[])Copyright © 2010-2013 NWTS Java Code. All Rights Reserved. Licensed Under the Apache License version 2.0.