The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

pkcs5-tool - PKCS#5 Password-Based Encryption Tools

SYNOPSIS

pkcs5-tool [OPTIONS]

Options:
      --help                Brief help message
      --man                 Full documentation
      --version             Print version
  -v, --verbose             Verbose

      --algorithm           PBE algorithm
      --list-algorithms     List PBE algorithms

  -0, --null                Return NULL char instead of new line

      --password            Password
      --input               Input data
    
      --encrypt             Encrypt some data
      --decrypt             Decrypt some data

      --format=FORMAT       input/output format (base64 or hex)
      --base64              Base64 input/output format
      --hex                 HEX input/output format

Examples:

    Encrypt:

        pkcs5-tool --algorithm PBEWithHmacSHA1AndAES_128 --password mypassword --input secret --encrypt

    Decrypt:

        pkcs5-tool --algorithm PBEWithHmacSHA1AndAES_128 --password mypassword --input <Base64 encrypted data> --decrypt

    Read input from STDIN:

        echo -n "secret" | pkcs5-tool --algorithm PBEWithHmacSHA1AndAES_128 --password mypassword --encrypt
        pkcs5-tool --algorithm PBEWithHmacSHA1AndAES_128 --password mypassword --encrypt < /path/of/secret

    env: or file: prefix for --password and --input params:

        pkcs5-tool --algorithm PBEWithHmacSHA1AndAES_128 --password env:APP_PASSWORD --input secret --encrypt > /path/data.enc
        pkcs5-tool --algorithm PBEWithHmacSHA1AndAES_128 --password env:APP_PASSWORD --input file:/path/data.enc --decrypt

DESCRIPTION

pkcs5-tool PKCS#5 Password-Based Encryption Tools

AUTHOR

Giuseppe Di Terlizzi

COPYRIGHT AND LICENSE

Copyright © 2020-2021 Giuseppe Di Terlizzi

You may use and distribute this module according to the same terms that Perl is distributed under.