GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DBIX::CLASS::ENCODEDCOLUMN::CRYPT::OPENPGP (3)

.ds Aq ’

NAME

DBIx::Class::EncodedColumn::Crypt::OpenPGP - Encrypt columns using Crypt::OpenPGP

CONTENTS

SYNOPSIS



  __PACKAGE__->add_columns(
    secret_data => {
        data_type => TEXT,
        encode_column => 1,
        encode_class  => Crypt::OpenPGP,
        encode_args   => {
            recipient => 7BEF6294,
        },
        encode_check_method => decrypt_data,
 };

 my $row = $schema->resultset(EncryptedClass)
                ->create({ secret_data => This is secret });

 is(
    $row->decrypt_data(Private Key Passphrase),
        This is secret,
        PGP/GPG Encryption works!
 );



DESCRIPTION

This is a conduit to working with Crypt::OpenPGP, so that you can encrypt data in your database using gpg. Currently this module only handles encrypting but it may add signing of columns in the future

CONFIGURATION

In the column definition, specify the encode_args hash as listed in the synopsis. The recipient is required if doing key exchange encryption, or if you want to use symmetric key encryption using a passphrase you can specify a passphrase option:



 encode_args => { passphrase => "Shared Secret" }



If you have a separate path to your public and private key ring file, or if you have alternative Crypt::OpenPGP configuration, you can specify the constructor args using the pgp_args configuration key:



    encode_args => {
        pgp_args => {
            SecRing => "$FindBin::Bin/var/secring.gpg",
            PubRing => "$FindBin::Bin/var/pubring.gpg",
        }
    }



The included tests cover good usage, and it is advised to briefly browse through them.

Also, remember to keep your private keys secure!

AUTHOR

J. Shirley <cpan@coldhardcode.com>

LICENSE

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DBIX::CLASS::ENCODEDCOLUMN::CRYPT::OPENPGP (3) 2014-02-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.