public final class OpenSSLEncryptor extends Object implements Encryptor
echo -n "foo" | openssl enc -aes128 -e -base64 -A -k "bar" echo -n "U2FsdGVkX1+VsRny+UbwuLllbAQ5yK/3MenTFJEKRVE=" | openssl enc -aes128 -d -base64 -A -k "bar"
| Constructor and Description |
|---|
OpenSSLEncryptor(OpenSSLContext context,
String password) |
OpenSSLEncryptor(String password) |
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String text) |
protected static byte[] |
doCipher(OpenSSLContext context,
int mode,
byte[] salt,
byte[] bytes,
byte[] password) |
byte[] |
encrypt(byte[] bytes) |
void |
encrypt(File src,
File dst) |
void |
encrypt(InputStream in,
OutputStream out) |
String |
encrypt(String text) |
OpenSSLContext |
getContext() |
public OpenSSLEncryptor(String password)
public OpenSSLEncryptor(OpenSSLContext context, String password)
public void encrypt(InputStream in, OutputStream out) throws IOException
IOExceptionpublic byte[] encrypt(byte[] bytes)
protected static byte[] doCipher(OpenSSLContext context, int mode, byte[] salt, byte[] bytes, byte[] password)
public OpenSSLContext getContext()
Copyright © 2010–2014 The Kuali Foundation. All rights reserved.