NAME

KiokuDB::Serializer::Crypt - encrypt data stored in KiokuDB

VERSION

version 0.02

SYNOPSIS

use KiokuDB::Util;
use KiokuDB::Serializer::Crypt;

my $dsn    = '...';
my $secret = '...';

my $backend = KiokuDB::Util::dsn_to_backend(
    $dsn,
    serializer => KiokuDB::Serializer::Crypt->new(
        serializer   => 'json',
        crypt_cipher => 'Rijndael',
        crypt_mode   => 'CFB',
        crypt_key    => $secret,
    ),
)

my $d = KiokuDB->new(backend => $backend);

DESCRIPTION

This is a custom serializer for KiokuDB, which wraps an existing serializer, encrypting the data before it is stored, and decrypting the data as it is retrieved. It can use several different encryption schemes (it's based on Crypt::Util, so anything that that supports).

ATTRIBUTES

crypt_key

The encryption key to use for encrypting and decrypting. Corresponds to default_key in Crypt::Util.

crypt_cipher

The encryption cipher to use. Corresponds to default_cipher in Crypt::Util, and defaults to Rijndael. You must ensure the appropriate cipher backend is installed (by adding, for instance, Crypt::Rijndael to the dependency list for your application).

crypt_mode

The encryption mode to use. Corresponds to default_mode in Crypt::Util, and defaults to CFB. You must ensure the appropriate mode backend is installed (by adding, for instance, Crypt::CFB to the dependency list for your application).

crypt

The Crypt::Util object which will be used for the encryption. Typically, this will be automatically created based on the other attribute values, but an already-built object can be passed in here for more complicated usages.

serializer

The underlying serializer to use. KiokuDB will use this serializer to get a string representation of the object which will then be encrypted. Defaults to 'storable'.

BUGS

No known bugs.

Please report any bugs through RT: email bug-kiokudb-serializer-crypt at rt.cpan.org, or browse to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=KiokuDB-Serializer-Crypt.

SEE ALSO

SUPPORT

You can find this documentation for this module with the perldoc command.

perldoc KiokuDB::Serializer::Crypt

You can also look for information at:

AUTHOR

Jesse Luehrs <doy at tozt dot net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Jesse Luehrs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.