public class Encryptor extends Object
Constructor and Description |
---|
Encryptor(CipherProvider cipherProvider) |
Modifier and Type | Method and Description |
---|---|
String |
decodeAndDecryptString(byte[] input)
Base64 decode then decrypt the given bytes, assuming it was a string that was encrypted and encoded using the
same encryption transformation as this class.
|
byte[] |
encryptAndEncodeString(String input)
Encrypt then base64 encode the given input string.
|
public Encryptor(CipherProvider cipherProvider)
public byte[] encryptAndEncodeString(String input) throws GeneralSecurityException
input
- string to encrypt and base64 encodeGeneralSecurityException
- if there was an exception encryptingpublic String decodeAndDecryptString(byte[] input) throws GeneralSecurityException
input
- bytes to decode and decryptGeneralSecurityException
- if there was an exception decodingCopyright © 2013-2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.