cryptography icon indicating copy to clipboard operation
cryptography copied to clipboard

Add `Sha1` to Hmac class

Open jxstxn1 opened this issue 3 years ago • 0 comments

I think we should probably add the Sha1 algorithm to the HMac class.

What is the Problem:

Im currently porting an old Android App to Dart in combination with Flutter. The old Java implementation is using Pbkdf2 with Sha1. According to the Docs Sha1 should be selectable. But it isnt.

What is the solution:

Add a factory for Sha1 in the HMac class.

Update:

Found out that you can use Sha1 like this: Hmac(Sha1()). I still consider that adding a factory constructor is much more useful and easier to understand.

jxstxn1 avatar Apr 27 '22 19:04 jxstxn1