public final class CryptoService extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
digest(InputStream stream,
String strAlgorithm)
Get a digest of the content of a stream
|
static String |
encrypt(String strDataToEncrypt,
String strAlgorithm)
Encrypt a data using an algorithm defined in lutece.properties
|
static String |
getCryptoKey()
Get the cryptographic key of the application
|
static String |
hmacSHA256(String message)
Get the HmacSHA256 of a message using the app crypto key.
|
public static String encrypt(String strDataToEncrypt, String strAlgorithm)
strDataToEncrypt - The data to encryptstrAlgorithm - the algorithmpublic static String digest(InputStream stream, String strAlgorithm)
stream - the stream containing the data to digeststrAlgorithm - the digest AlgorithmMessageDigestpublic static String getCryptoKey()
Copyright © 2020 City of Paris. All rights reserved.