develooper Front page | perl.modules | Postings from February 2002

Module submission Crypt::OpenSSL::BIO

From:
Perl Authors Upload Server
Date:
February 11, 2002 14:38
Subject:
Module submission Crypt::OpenSSL::BIO
Message ID:
200202112238.XAA28715@pause.perl.org

The following module was proposed for inclusion in the Module List:

  modid:       Crypt::OpenSSL::BIO
  DSLIP:       cdhOp
  description: Interface to OpenSSL BIO functions
  userid:      SHAYH (Shay Harding)
  chapterid:   14 (Security_and_Encryption)
  communities:

  similar:
    None

  rationale:

    There already exists Crypt::OpenSSL::RSA which uses the openssl
    libraries. Used same namespace to avoid adding yet another one. The
    BIO modules make encryption/decryption and encoding/decoding very
    simple. An example would be:

    #!/usr/bin/perl

    use Crypt::OpenSSL::BIO::CFB::Blowfish; my $bf = new
    Crypt::OpenSSL::BIO::CFB::Blowfish("some_key");

    $cipher = $bf->encrypt($text); $plain = $bf->decrypt($cipher);

    No need to write encrypt/decrypt wrapper functions to encrypt data
    in chunks. Just pass it all in and it gets encrypted/decrypted
    correctly.

    OpenSSL is already widely used and is continuously developed. It
    can be compiled on many operating systems so portability is less of
    an issue.

    Using the above example you could just as easily encode the data
    for transport:

    use Crypt::OpenSSL::BIO::Base64; my $b64 = new
    Crypt::OpenSSL::BIO::Base64;

    $b64_enc = $b64->encode($cipher); $b64_dec =
    $b64->decode($b64_enc);

    Again, 4 lines of simple code to Base64, the encrypted data. Can
    then be sent via query string, posted, stored in database, etc
    easily.

    And if you need lower-level access to the BIO functions, just use
    Crypt::OpenSSL::BIO directly. All other modules within this
    namespace use this module for all functions. They are simply
    provided for convenience.

  enteredby:   SHAYH (Shay Harding)
  enteredon:   Mon Feb 11 22:38:37 2002 GMT

The resulting entry would be:

Crypt::OpenSSL::
::BIO             cdhOp Interface to OpenSSL BIO functions           SHAYH


Thanks for registering,
The Pause Team

PS: The following links are only valid for module list maintainers:

Registration form with editing capabilities:
  https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=88000000_c37113c09f149385&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
  https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=88000000_c37113c09f149385&SUBMIT_pause99_add_mod_insertit=1



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About