2017-25 © Pedro Peláez
 

library cryptokey

A command line tool for generating keys using a CSPRNG.

image

andrewcarteruk/cryptokey

A command line tool for generating keys using a CSPRNG.

  • Friday, May 5, 2017
  • by AndrewCarterUK
  • Repository
  • 1 Watchers
  • 33 Stars
  • 1,551 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 25 % Grown

The README.md

CryptoKey

Latest Stable Version Build Status Code Coverage Scrutinizer Code Quality Total Downloads License, (*1)

A tool for generating keys using a CSPRNG., (*2)

If you have OpenSSL installed read below, as you probably do not need to install this tool., (*3)

By AndrewCarterUK (Twitter), (*4)

How To Install

composer global require andrewcarteruk/cryptokey

Make sure you have added your global composer binary directory to the PATH in your ~/.bash_profile (or ~/.bashrc) file:, (*5)

export PATH=~/.composer/vendor/bin:$PATH

This blog explains the process of global composer installs in more detail., (*6)

Usage

$ cryptokey generate
bGS6lzFqvvSQ8ALbOxatm7/Vk7mLQyzqaS34Q4oR1ew=

$ cryptokey generate --format=hex
531a5187f08846a40ab6a9f9c651831bdd188e84b026804039773ef0aa51e500

$ cryptokey generate --entropy=64
ladkecOLF7RvMl/J5EGr/SMz5InfSyX+DA9CvecE/OiVFndnMqgvfLofNGO6/Gc5P1Io+eHYhcJphIRHCB9Kpg==

You can use the --format option to switch between base64 (default) and hex output., (*7)

You can use the --entropy option to select the number of bytes of entropy. The default is 32 bytes (256 bits)., (*8)

An Alternative: OpenSSL

If you have OpenSSL installed, you may find that the command(s) below are sufficient for your needs:, (*9)

$ openssl rand -base64 32
3cDyOf7I6P4sU+ImVmIJW8k/IzGyoCACaJi+PbVY+I8=

$ openssl rand -hex 32
78a59462d4264e29be184226e7a46de0df96f97682963977fe61970b632d9faa

The OpenSSL command has -base64 and -hex options for switching between base64 and hex output., (*10)

The final argument is the number of bytes of entropy to draw. The number of bits of entropy is this number multiplied by 8., (*11)

The Versions

05/05 2017

dev-master

9999999-dev http://github.com/AndrewCarterUK/CryptoKey

A command line tool for generating keys using a CSPRNG.

  Sources   Download

MIT

The Requires

 

The Development Requires

generator crypto key keygen gen

28/04 2016

v0.2.0

0.2.0.0 http://github.com/AndrewCarterUK/CryptoKey

A command line tool for generating keys using a CSPRNG.

  Sources   Download

MIT

The Requires

 

The Development Requires

generator crypto key keygen gen

14/12 2015

v0.1.0

0.1.0.0 http://github.com/AndrewCarterUK/CryptoKey

A command line tool for generating keys using a CSPRNG.

  Sources   Download

MIT

The Requires

 

The Development Requires

generator crypto key keygen gen