Hash Value tool extension (using HMAC-SHA1, HMAC-SHA256 or HMAC-SHA512)

This is my first extension, so I’m sorry for any errors or bugs.

This is the tool: image

It is very simple, however, I did dozens of tests with the three HMAC methods (SHA1, SHA256 and SHA512) and it worked perfectly.

Its inputs are Strings, and its output too: it is converted to a String in Hexadecimal format (I didn’t use Base64).

image

I looked for an extension that had these functions, but I couldn’t find it anywhere. So, I decided to create my own extension and now it’s there for everyone.

Any questions just ask me here on the forum.

com.extensions.hmacsha.aix (8.2 KB)

14 Likes

What can i use it for , I have no knowledge about this

1 Like

Many APIs require this type of encryption. Example: bitcoin brokers, banks, and more.

1 Like

A small suggestion:
Do not use all caps in Method names.

2 Likes

thank you for your contribution.

Please follow the naming conventions, which is UpperCamelCase for property, method and event names (i.e. the first letter should be a capital letter) and lowerCamelCase for parameter names, no underscores .
naming

Also you might want to read this


to understand, that HMAC is not about encryption, it is hash based message authentication code, so your extension is not really an encryption tool…
EDIT: I now updated the subject into “Hash Value tool extension” and I hope, you are ok with that…

Hashing vs. Encryption algorithms

There is a fundamental difference between Hashing and Encryption algorithms, see this stackoverflow answer: Hashing is one way. You can not get your data/string from a hash code. Encryption is 2 way - you can decrypt again the encrypted string if you have the key with you.

Taifun

2 Likes

thank you for your contribution.

I’m gonna fix that.

Please publish the photo of part of your app where the extension is being used. REMEMBER TO HIDE SECRET INFORMATION.

I performed several tests again, and for me it’s working perfectly.

Anyway, I’ve already updated the extension and fixed some variables standardization. Try again with this: com.extensions.hmacsha.aix (8.2 KB)

what will come in message & secret @Taifun

message is the text you like to get a hash value from
secret is the key or password you are using for the hashing

Taifun

Thank you soooo much !
I have problem with the Taïfun extension (I don’t know why) ; this one works perfectly !
Patrice

We do not know ether and unfortunately with these little information you are providing there is not really something I could do to help you

Taifun