public final class Encryptor extends Object
Modifier and Type | Method and Description |
---|---|
String |
decode(String encoded,
CipherAlgorithm cipherAlgorithm) |
String |
encode(String value,
CipherAlgorithm cipherAlgorithm) |
static Encryptor |
getInstance() |
static Encryptor |
getInstance(String secretKey) |
boolean |
verify(String value,
CipherAlgorithm cipherAlgorithm,
String encoded) |
public static Encryptor getInstance()
public String encode(String value, CipherAlgorithm cipherAlgorithm) throws UnsupportedEncodingException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
public boolean verify(String value, CipherAlgorithm cipherAlgorithm, String encoded)
public String decode(String encoded, CipherAlgorithm cipherAlgorithm) throws UnsupportedEncodingException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.