Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v1.3.1; 2026-04-13
```
add modes: MD6-128, 224, 256, 384, 512
```
### v1.3.0; 2026-04-10
```
added HMAC modes: -m 50, 60, 150, 160, 1450, 1460, 1750, 1760, 6050, 6060
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.26.2

require (
github.com/cyclone-github/base58 v1.0.1
github.com/cyclone-github/md6 v0.4.13
github.com/ebfe/keccak v0.0.0-20150115210727-5cc570678d1b
github.com/openwall/yescrypt-go v1.0.0
golang.org/x/crypto v0.50.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/cyclone-github/base58 v1.0.1 h1:T11LCPf4qv4tZg9c6GL4iiN1GGeOQBC4Szudtz5dmCE=
github.com/cyclone-github/base58 v1.0.1/go.mod h1:hwV+09D9orDfxUj3/soTBr/Xwa/dinnLUQtMOxbbQN0=
github.com/cyclone-github/md6 v0.4.13 h1:qxTCyq+ZRaHLigNi8FsE8bgF82Z4OM8iwCWbVPMSpwk=
github.com/cyclone-github/md6 v0.4.13/go.mod h1:yKL7IkZQ5eBFd5qEp9SGbEiCE0RThq9AdPD4bFinsqA=
github.com/ebfe/keccak v0.0.0-20150115210727-5cc570678d1b h1:BMyjwV6Fal/Ffphi4dJfulSxMeDl0xFS2vs5QLr6rsI=
github.com/ebfe/keccak v0.0.0-20150115210727-5cc570678d1b/go.mod h1:fnviDXB7GJWiSUI9thIXmk9QKM8Rhj1JV/LcMRzkiVA=
github.com/openwall/yescrypt-go v1.0.0 h1:jsGk48zkFvtUjGVOhYPGh+CS595JmTRcKnpggK2AON4=
Expand Down
37 changes: 36 additions & 1 deletion hashgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"unicode/utf8"

"github.com/cyclone-github/base58"
"github.com/cyclone-github/md6"
"github.com/ebfe/keccak" // keccak 224/384
"github.com/openwall/yescrypt-go"
"golang.org/x/crypto/argon2"
Expand Down Expand Up @@ -63,10 +64,12 @@ v1.3.0; 2026-04-11
optimized salt RNG for fewer syscalls on salted hash modes
added sanity check on invalid -m nth before opening stdin/wordlist
compiled with Go v1.26.2
v1.3.1; 2026-04-13
add modes: MD6-128, 224, 256, 384, 512
*/

func versionFunc() {
fmt.Fprintln(os.Stderr, "hashgen v1.3.0; 2026-04-11\nhttps://github.com/cyclone-github/hashgen")
fmt.Fprintln(os.Stderr, "hashgen v1.3.1; 2026-04-13\nhttps://github.com/cyclone-github/hashgen")
}

// help function
Expand Down Expand Up @@ -117,6 +120,11 @@ func helpFunc() {
"70\t\t(hashcat compatible md5 utf16le($pass))\n" +
"md5md5\t\t2600\n" +
"md5crypt\t500 (Linux shadow $1$)\n" +
"md6-128\n" +
"md6-224\n" +
"md6-256\t\t34600\n" +
"md6-384\n" +
"md6-512\n" +
"mysql4/mysql5\t300\n" +
"morsecode\t(ITU-R M.1677-1)\n" +
"morsedecode\t(ITU-R M.1677-1)\n" +
Expand Down Expand Up @@ -1203,6 +1211,33 @@ func hashBytesDispatch(hashFunc string, data []byte, cost int) (string, bool) {
outer := md5.Sum(innerHex[:])
return hex.EncodeToString(outer[:]), true

// MD6

// md6-128
case "md6-128", "md6128":
h := md6.Sum(128, data)
return hex.EncodeToString(h), true

// md6-224
case "md6-224", "md6224":
h := md6.Sum(224, data)
return hex.EncodeToString(h), true

// md6-256
case "md6", "md6-256", "md6256", "34600":
h := md6.Sum256(data)
return hex.EncodeToString(h[:]), true

// md6-384
case "md6-384", "md6384":
h := md6.Sum(384, data)
return hex.EncodeToString(h), true

// md6-512
case "md6-512", "md6512":
h := md6.Sum512(data)
return hex.EncodeToString(h[:]), true

// SHA1

// sha1 -m 100
Expand Down
Loading