12.2. crate_bulk_hash

A tool to hash IDs in bulk, for linkages.

USAGE: crate_bulk_hash [-h] [--outfile OUTFILE] [--key KEY]
                       [--keyfile KEYFILE]
                       [--method {HMAC_MD5,HMAC_SHA256,HMAC_SHA512}]
                       [--keepid] [--verbose]

Hash IDs in bulk, using a cryptographic hash function.

  infile                Input file, or '-' for stdin. Use one line per thing
                        to be hashed. Comments (marked with '#') and blank
                        lines are ignored. Lines have whitespace stripped left
                        and right.

  -h, --help            show this help message and exit
  --outfile OUTFILE     Output file, or '-' for stdout. One line will be
                        written for every input line. Blank lines will be
                        written for commented or blank input. (default: -)
  --key KEY             Secret key for hasher (warning: may be visible in
                        process list; see also --keyfile) (default: None)
  --keyfile KEYFILE     File whose first noncomment line contains the secret
                        key for the hasher. (It will be whitespace-stripped
                        right and left.) (default: None)
  --method {HMAC_MD5,HMAC_SHA256,HMAC_SHA512}
                        Hash method (default: HMAC_MD5)
  --keepid              Produce CSV output with (hash,id) rather than just the
                        hash (default: False)
  --verbose, -v         Be verbose (NB will write key to stderr) (default: