DBIx-Class-EncodedColumn

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.00006        2010-01-15
        - Fix build_requires version number for SQLA ( Arthur Axel "fREW" Schmidt )
        - Don't encode undef ( osfameron )

0.00005        2009-10-11
        - Fix hashing/validation with Whirlpool ( Kent Fredric )
        - Add Repository META

0.00004        2009-09-03
        - correct option name typo in the docs (digest_class -> encode_class)
        - put the .gpg files back into the test so tests pass (mst == fool)
0.00003        2009-09-01
        - fixup copyright and licensing info to the proposed new best
          practice for /^DBIx::Class/ modules
        - close dbh before unlinking so tests pass on win32

0.00002        2008-07-27
        - Support for Crypt::OpenPGP

0.00001        2008-02-01
        - No changes

MANIFEST  view on Meta::CPAN

t/lib/DigestTest/Schema.pm
t/lib/DigestTest/Schema/Bcrypt.pm
t/lib/DigestTest/Schema/PGP.pm
t/lib/DigestTest/Schema/SHA.pm
t/lib/DigestTest/Schema/Whirlpool.pm
t/lib/DigestTest/Schema/WithTimeStamp.pm
t/lib/DigestTest/Schema/WithTimeStampChild.pm
t/lib/DigestTest/Schema/WithTimeStampChildWrongOrder.pm
t/lib/DigestTest/Schema/WithTimeStampParent.pm
t/lib/DigestTest/Schema/WithTimeStampParentWrongOrder.pm
t/lib/DigestTest/Schema/pubring.gpg
t/lib/DigestTest/Schema/secring.gpg
t/open_pgp.t
t/var/DigestTest-Schema-1.x-SQLite.sql
t/whirlpool.t

lib/DBIx/Class/EncodedColumn/Crypt/OpenPGP.pm  view on Meta::CPAN


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

=head1 DESCRIPTION

This is a conduit to working with L<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 

=head1 CONFIGURATION

In the column definition, specify the C<encode_args> hash as listed in the
synopsis.  The C<recipient> is required if doing key exchange encryption, or
if you want to use symmetric key encryption using a passphrase you can
specify a C<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 L<Crypt::OpenPGP> configuration, you can specify the
constructor args using the C<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!

=cut

t/lib/DigestTest/Schema/PGP.pm  view on Meta::CPAN

package # hide from PAUSE
  DigestTest::Schema::PGP;

use strict;
use warnings;
use base qw/DBIx::Class/;
use Dir::Self;
use File::Spec;

my $pgp_conf = {
  SecRing => File::Spec->catdir(__DIR__,'secring.gpg'),
  PubRing => File::Spec->catdir(__DIR__,'pubring.gpg'),
};

__PACKAGE__->load_components(qw/EncodedColumn Core/);
__PACKAGE__->table('test_pgp');
__PACKAGE__->add_columns(
  id => {
    data_type => 'int',
    is_nullable => 0,
    is_auto_increment => 1
  },



( run in 0.936 second using v1.01-cache-2.11-cpan-df04353d9ac )