public final class EncryptionUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
decryptRsa(Key key,
String encryptedBase64)
Decrypt using RSA (private or public key).
|
static String |
encryptAes(char[] masterPassword,
String secret)
Encrypt using AES, salted and seeded.
|
static String |
encryptRsa(Key key,
String secret)
Encrypt secret using RSA (private or public key).
|
public static String decryptRsa(Key key, String encryptedBase64) throws ConfigEncryptionException
key - private or public key to use to decryptencryptedBase64 - base64 encoded encrypted secretConfigEncryptionException - If any problem with decryption occurspublic static String encryptRsa(Key key, String secret) throws ConfigEncryptionException
key - private or public key to use to encryptsecret - secret to encryptConfigEncryptionException - If any problem with encryption occurspublic static String encryptAes(char[] masterPassword, String secret) throws ConfigEncryptionException
masterPassword - master passwordsecret - secret to encryptConfigEncryptionException - If any problem with encryption occursCopyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.