public class CryptoServiceImpl extends Object implements CryptoService
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
CryptoServiceImpl() |
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String encrypted)
decrypt given text as plainText (encrypted), use cryptoKey as string in context and return decrypted plainText.
|
String |
decrypt(String cryptoKey,
String encrypted)
decrypt given cryptoKey as string and text as plainText (encrypted) and return decrypted plainText.
|
String |
encrypt(String text)
encrypt given text as plainText, use cryptoKey as string in context and return encrypted plainText.
|
String |
encrypt(String cryptoKey,
String text)
encrypt given cryptoKey as string and text as plainText and return encrypted plainText.
|
String |
getPrefix() |
public String getPrefix()
getPrefix
in interface CryptoService
public String encrypt(String text) throws TechnicalException
encrypt
in interface CryptoService
text
- is plain text.TechnicalException
- is thrown if you have a technical error (NoSuchAlgorithmException or NoSuchPaddingException or InvalidKeyException or IllegalBlockSizeException or BadPaddingException, ...) in
NoraUi.public String decrypt(String encrypted) throws TechnicalException
decrypt
in interface CryptoService
encrypted
- is encrypted plain text.TechnicalException
- is thrown if you have a technical error (NoSuchAlgorithmException or NoSuchPaddingException or InvalidKeyException or IllegalBlockSizeException or BadPaddingException, ...) in
NoraUi.public String encrypt(String cryptoKey, String text) throws TechnicalException
encrypt
in interface CryptoService
cryptoKey
- as string.text
- as string.TechnicalException
- is thrown if you have a technical error (NoSuchAlgorithmException or NoSuchPaddingException or InvalidKeyException or IllegalBlockSizeException or BadPaddingException, ...) in
NoraUi.public String decrypt(String cryptoKey, String encrypted) throws TechnicalException
decrypt
in interface CryptoService
cryptoKey
- as string.encrypted
- as string.TechnicalException
- is thrown if you have a technical error (NoSuchAlgorithmException or NoSuchPaddingException or InvalidKeyException or IllegalBlockSizeException or BadPaddingException, ...) in
NoraUi.Copyright © 2023 NoraUi. All rights reserved.