public class CryptoService extends Object
Constructor and Description |
---|
CryptoService(String strEncryptionKey)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String strEncrypted)
Decrypts the specified string
|
String |
encrypt(String strSource)
Encrypts the specified string
|
public CryptoService(String strEncryptionKey) throws KeyDiversificationException
strEncryptionKey
- An encryption keyKeyDiversificationException
- If an error occursInvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeySpecException
public String encrypt(String strSource) throws KeyDiversificationException
strSource
- the string to encryptKeyDiversificationException
- if there is an error during the treatmentpublic String decrypt(String strEncrypted) throws KeyDiversificationException
strEncrypted
- The encrypted stringKeyDiversificationException
- if there is an error during the treatmentCopyright © 2017 City of Paris. All rights reserved.