Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/x13a/b2pw
Convert bytes to password.
https://github.com/x13a/b2pw
zig zig-lang
Last synced: 15 days ago
JSON representation
Convert bytes to password.
- Host: GitHub
- URL: https://github.com/x13a/b2pw
- Owner: x13a
- License: gpl-3.0
- Archived: true
- Created: 2021-11-27T04:48:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-24T21:26:55.000Z (about 3 years ago)
- Last Synced: 2024-10-02T07:04:46.054Z (4 months ago)
- Topics: zig, zig-lang
- Language: Zig
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```sh
$ make
$ make install
```
or
```sh
$ brew tap x13a/tap
$ brew install x13a/tap/b2pw
```## Usage
```text
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
```sh
~
❯ echo -n "test1" | b2pw
RQ3sDNrPzzkiVLYsqRzsnQTkgbK4cm0U
~
❯ echo -n "test1" | b2pw
RQ3sDNrPzzkiVLYsqRzsnQTkgbK4cm0U
~
❯ echo -n "test2" | b2pw
KS4qquoEFhN4XJiECDcQZxJXca6ZrKCN
```