HMAC SHA256 hash generation in Java and Python
I had code in Python that was generating hash code using HMAC SHA265 that is need to be refactored into Java
Gone through different stackoverflow Q&A and formulated the code in Java to produce the same hash code. Code is in HMAC.java
The calculated hash code of This is the hash message
with key This is the secret
in base64 string is KNQ4jcjNbLkoZ0dY4n4yIQv8nHwU2ZvbB1YRN3f9CYI=
.
Took some code from https://gist.github.com/MaximeFrancoeur/bcb7fc2db08c704f322a to generate hex string value.