public class NetStorageUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NetStorageUtils.KeyedHashAlgorithm
An enum of the keyed-hash algorithms supported by
computeKeyedHash(byte[], String, nl.nn.adapterframework.extensions.akamai.NetStorageUtils.KeyedHashAlgorithm)
Currently supported hashes include HMAC-MD5; HMAC-SHA1; HMAC-SHA256
The string representation matches the java Mac.getInstance(String) } cononical names. |
Constructor and Description |
---|
NetStorageUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
computeKeyedHash(byte[] data,
String key,
NetStorageUtils.KeyedHashAlgorithm hashType)
Computes the HMAC hash of a given byte[].
|
static String |
convertMapAsQueryParams(Map<String,String> data)
Convert Map
|
static String |
encodeBase64(byte[] value)
Base64-encode a byte array.
|
public static byte[] computeKeyedHash(byte[] data, String key, NetStorageUtils.KeyedHashAlgorithm hashType)
data
- byte[] of content to hashkey
- secret key to salt the hashhashType
- determines which alogirthm to use. The recommendation is to use HMAC-SHA256public static String encodeBase64(byte[] value)
value
- byte array to encode.public static String convertMapAsQueryParams(Map<String,String> data)
data
- a Key-Value mapCopyright © 2023 Frank!Framework. All rights reserved.