noraj / haiti

:key: Hash type identifier (CLI & lib)
https://noraj.github.io/haiti/
MIT License
742 stars 55 forks source link

Adding PBKDF2-HMAC-* support #161

Closed lap1nou closed 9 months ago

lap1nou commented 9 months ago

Hello,

This PR will try to solve #160. I asked ChatGPT to write a Regex and now I'm trying to make it work.

It's still a draft, for the moment I got an error:

/usr/local/rvm/gems/ruby-3.2.2@haiti/gems/haiti-hash-1.5.0/lib/haiti.rb:64:in `initialize': unmatched close parenthesis: /\A\(md5|pbkdf2-hmac-md5):(\d+:[A-Za-z0-9+\/]+={0,2}:[A-Za-z0-9+\/]+={0,2})|(\$pbkdf2-hmac-md5\$\d+\$[A-Fa-f0-9]+\$[A-Fa-f0-9]+)\Z/i (RegexpError)
sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

noraj commented 9 months ago

I'll examine #160 more thoroughly to identify mismatch, maybe some miscategorized modes, what can be mutualized, etc.

noraj commented 9 months ago

See https://github.com/noraj/haiti/issues/160#issuecomment-1776151251

Implemented in https://github.com/noraj/haiti/compare/noraj/pbkdf2?expand=1