Total Pageviews

Tuesday, 14 June 2016

Picugen

Picugen is a cryptographic and non-cryptographic hash/checksum generator written in Go. It can be used to easily obtain digests of strings and files using a large variety of algorithms including MD5, SHA-1, and SHA-256.

Usage: picugen [-a <algorithm>] [-salt <salt>] [-s <string to hash>] / <file(s) to hash>

Download

PlatformVersionPackageSize
Linux (32-bit)1.0 – 2011-08-12picugen-1.0-i386.tar.gz386 KB
Linux (64-bit)1.0 – 2011-08-12picugen-1.0-amd64.tar.gz378 KB
Git repositoryDevelopmenthttps://github.com/patrickmn/picugen

Examples

./picugen -a md5 document.txt                Generate MD5 digest of a file
./picugen -a md5 *                           Generate MD5 digests of all files in folder
./picugen -a sha1 -s hello world             Generate SHA-1 digest of a string
./picugen -a sha1 -salt s4lt -s hello world  Generate salted SHA-1 digest of a string
./picugen -a hmacsha1 -k k3y -s untouched    Generate HMAC of a string using SHA-1

Features

The available algorithms are (with SHA-256 being the default):
adler32         Adler-32 checksum (RFC 1950)
crc32           32-bit cyclic redundancy check (CRC-32) checksum (defaults to IEEE polynomial)
crc32castagnoli CRC-32 using the Castagnoli polynomial (0x82f63b78)
crc32ieee       CRC-32 using the IEEE polynomial (0xedb88320)
crc32koopman    CRC-32 using the Koopman polynomial (0xeb31d82e)
crc64           64-bit cyclic redundancy check (CRC-64) checksum (defaults to ISO polynomial)
crc64ecma       CRC-64 using the ECMA polynomial (0xC96C5795D7870F42)
crc64iso        CRC-64 using the ISO polynomial (0xD800000000000000)
fnv             FNV-1 non-cryptographic hash (defaults to fnv32)
fnv32           32-bit FNV-1
fnv32a          32-bit FNV-1a
fnv64           64-bit FNV-1
fnv64a          64-bit FNV-1a
hmac            Keyed-Hash Message Authentication Code (HMAC) (requires -k <key>) (defaults to SHA-256)
hmacmd5         HMAC using MD5 (requires -k <key>)
hmacsha1        HMAC using SHA-1 (requires -k <key>)
hmacsha256      HMAC using SHA-256 (requires -k <key>)
hmacsha512      HMAC using SHA-512 (requires -k <key>)
md4             MD4 hash (RFC 1320)
md5             MD5 hash (RFC 1321)
ripemd160       RIPEMD-160 hash
sha1            SHA-1 hash (RFC 3174)
sha224          SHA-224 hash (FIPS 180-2)
sha256          SHA-256 hash (FIPS 180-2)
sha384          SHA-384 hash (FIPS 180-2)
sha512          SHA-512 hash (FIPS 180-2)
Note: For complex strings, put the string in a file, then run Picugen on the file. (Don’t add newlines to the file as they will alter the output.)
Sample output:
# picugen /bin/bash
664c1834f30f83c97f48b1f364b8368bb0c9949a8fedd29413bb16d70a6e41c6  /bin/bash

# picugen -salt s3cr3t -s p4ssw0rd
bcd4a8f23d02931039f0296ca6164f3942b1629b12001bc8e6ffec4df8884848

# picugen -a md5 /etc/*.conf
2081f795b0f92490c1c3f00b964e36de  /etc/adduser.conf
7f4c49e01e0a23d2f4b20eeb32e95abb  /etc/blkid.conf
9c7fa15fd6d8f34a0267101f051f107b  /etc/ca-certificates.conf
8c0619be413824f1fc7698cee0f23811  /etc/debconf.conf
527e6a57d0bc9f7c1b1aca2071f3da00  /etc/deluser.conf
7e84402ab9129df85117336840b3d78f  /etc/ffserver.conf
629c0e2f8276b26c29b95f7ed53074d7  /etc/gai.conf
ca3e32b09c7bfda7e7e3580a587e3c2b  /etc/hdparm.conf
89408008f2585c957c031716600d5a80  /etc/host.conf
4cdcca89f13642d97f1044c647d19e2e  /etc/insserv.conf
f41f22e0d7f16d43f59f682c78224348  /etc/kernel-img.conf
6fb908bd3381b55ee942b261a701aea4  /etc/kerneloops.conf
4317c6de8564b68d628c21efa96b37e4  /etc/ld.so.conf
...

# picugen -a hmacsha1 -k 0r4cl3 -s this message is verifiable with the key
15dabc3b4c2cc60c216970a0723f24a3ffc4d4ca