public class EncryptionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
fromBase64(String content)
Decodes a Base64 encoded string.
|
static String |
hashWith(String algorithm,
String content)
Computes the hash for the given string with a given algorithm and transforms the binary
result into a hexadecimal lower case string.
|
static String |
sha256(String content)
Computes the SHA-256 hash for the given string and transforms the binary result into a
hexadecimal lower case string.
|
static String |
toBase64(String content)
Encodes the specified String using the Base64 encoding scheme.
|
public static String hashWith(String algorithm, String content)
algorithm - the name of the algorithm requestedcontent - a string input to encryptpublic static String sha256(String content)
content - a string input to encryptpublic static String toBase64(String content)
content - the String to be encodedCopyright © 2023. All rights reserved.