x13a / b2pw

Convert bytes to password.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

b2pw

Convert bytes to password.

Main purpose is to convert files to passwords. You can take any file and convert it to password up to 64 chars long. First we make hash of it using blake2b, than map each result byte to our alphabet. On the same file you always get the same password.

Installation

$ make
$ make install

or

$ brew tap x13a/tap
$ brew install x13a/tap/b2pw

Usage

b2pw [-hV] [-l NUM] [-a STR] [-k STR] [-c STR] [-n NUM]

[-h] * Print help and exit
[-V] * Print version and exit

[-l] * Length of password (default: 32)
[-a] * Alphabet (default: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789)
[-k] * Key (default: null)
[-c] * Additional chars (default: "")
[-n] * Number of bytes to read (default: 0 = all)

Example

~echo -n "test1" | b2pw
RQ3sDNrPzzkiVLYsqRzsnQTkgbK4cm0U
~echo -n "test1" | b2pw
RQ3sDNrPzzkiVLYsqRzsnQTkgbK4cm0U
~echo -n "test2" | b2pw
KS4qquoEFhN4XJiECDcQZxJXca6ZrKCN

About

Convert bytes to password.

License:GNU General Public License v3.0


Languages

Language:Zig 94.4%Language:Makefile 5.6%