calculateClientSecretHash static method
Translated from library aws-android-sdk-cognitoprovider@2.6.30
file CognitoSecretHash.java::getSecretHash()
Implementation
static String calculateClientSecretHash(
String userName, String clientId, String clientSecret) {
final hmac = Hmac(sha256, utf8.encode(clientSecret));
final digest = hmac.convert(utf8.encode(userName + clientId));
hmac.convert(digest.bytes);
return base64.encode(digest.bytes);
}