public final class StringCipher extends Object implements Serializable
| Constructor and Description |
|---|
StringCipher(SecretKey key,
String algorithm)
Constructor used to create this object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String data)
Takes a encrypted String as argument, decrypts it and returns the
decrypted String.
|
String |
encrypt(String data)
Takes a single String as an argument and returns an Encrypted version of
that String.
|
public StringCipher(SecretKey key, String algorithm)
key - Secret Key used to initialize both the encrypter and decrypter
instances.algorithm - Which algorithm to use for creating the encrypter and
decrypter instances.Copyright © 2017 PAWLIDI.DE. All rights reserved.