makekey Command

Purpose

Generates an encryption key.

Syntax

makekey

Description

The makekey command generates an encryption key for use with programs that perform encryption. Its input and output are usually pipes.

The makekey command reads 10 characters from standard input and writes 13 characters to standard output. The first 8 of the 10 input characters can be any sequence of ASCII characters, as specified by the ASCIICharacters parameter. The last two input characters, called the salt, are chosen from the sets 0 through 9, a through z, A through Z, . (period), and / (slash). The salt characters are repeated as the first two characters of the output. The remaining 11 output characters are chosen from the same set as the salt and constitute the output key that you use as the encryption key parameter of programs that perform encryption.

Examples

  1. To generate an encryption key for input string 1234567890, type the following:
    $ makekey
    1234567890
    Then press the Ctrl-D key. The following encryption key is generated, and the $ (shell prompt) follows immediately after the generated key on the same line:
    90y744T/NXw1U$
  2. To allow makekey to accept input strings through pipe, type the following command:
    $ echo 1234567890 | makekey
  3. To allow makekey to accept input strings from a file, type the following command:
    $ cat infile
    1234567890 
    
    $ makekey < infile
    Alternatively, you can type the following command:
    $ cat infile | makekey