Skip to content

v1.1.0: Binary mode

Compare
Choose a tag to compare
@wneessen wneessen released this 17 Mar 17:43
· 430 commits to main since this release
4a6b9b3

This release adds a new mode: binary mode. This new mode generates a binary secret with full 256 bites of randomness. Due to the nature of the mode, it will ignore most of the available options. The only available options for this mode are: -f to set the length of the returned secret in bytes, -bh to tell apg-go to output the generated secret in hexadecial representation and -bn to instruct apg-go to return a newline after the generated secret. Any other option available in the other modes will be ignored.

This mode can be useful for example if you need to generate a AES-256 encryption key. Since 32 bytes is the default length for the secret generation in this mode, you can simply generate a secret key with the following command:

$ apg -a 3 -bh
a1cdab8db365af3d70828b1fe43b7896190c157ad3f1ae2a0a1d52ec1628c6b5

For ease for readability we used the -bh flag, to instruct apg-go to output the secret in its hexadecimal representation

What's Changed

Full Changelog: v1.0.0...v1.1.0