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

OpenSSL::Cipher -- Access to OpenSSL Cipher functions

SYNOPSIS

        use OpenSSL::Cipher qw(new_encrypt new_decrypt enum_ciphers);

        my %cip = enum_ciphers();
        print "cipher \"$_\" keybytes = $cip{$_}\n" for(keys %cip);

        $ctx = new_encrypt("des-ede", "keykeyke");
        $enc = $ctx->update("hi wappla !");
        $enc .= $ctx->update ("this, too");
        $enc .= $ctx->final;

DESCRIPTION

        hmm. many things to add, but no time...
        

FUNCTIONS

$ctx = new_encrypt($cipname, $key)

Creates a handle for encryption method $ciphername using key $key.

$ctx = new_decrypt($cipname, $key)

Creates a handle for decryption method $ciphername using key $key.

$encdec = $ctx->update($string)

Adds $string for en/decryption.

$restbytes = $ctx->final

Finishes the encryption/decryption.

%cip = enum_ciphers();

Returns a list that consists of "ciphername, keybytes" pairs.

SEE ALSO

OpenSSL, OpenSSL::HMAC.

AUTHOR

Stefan Traby <stefan@hello-penguin.com> http://mindterm.plan9.de/