KiokuDB::Serializer::Crypt - encrypt data stored in KiokuDB
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);
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).
The encryption key to use for encrypting and decrypting. Corresponds to
default_key in Crypt::Util.
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).
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).
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.
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'.
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.
You can find this documentation for this module with the perldoc command.
You can also look for information at:
Jesse Luehrs <doy at tozt dot net>
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.