Tie-EncryptedHash
view release on metacpan or search on metacpan
README.html view on Meta::CPAN
hash. Assign new values to __password and __cipher and create a new
encrypting field. Transparent mode will be restricted to fields encrypted
with the current password.</p>
<p>
</p>
<h2><a name="error_handling">Error Handling</a></h2>
<p>Tie::Encrypted silently ignores access errors. It doesn't carp/croak when
you perform an illegal operation (like assign plaintext to an encrypting
field in opaque mode). This is to prevent data lossage, the kind that
results from abnormal termination of applications.</p>
<p>
</p>
<hr />
<h1><a name="quirks">QUIRKS</a></h1>
<p>
</p>
<h2><a name="autovivification">Autovivification</a></h2>
<p>Due to the nature of autovivified references (which spring into existence
when an undefined reference is dereferenced), references are stored as
plaintext in transparent mode. Analogous ciphertext representations are
maintained in parallel and restored to encrypting fields when password is
deleted. This process is completely transparent to the user, though it's
advisable to delete the password after the final assignment to a
Tie::EncryptedHash. This ensures plaintext representations and scaffolding
data structures are duly flushed.</p>
<p>
</p>
<h2><a name="data__dumper">Data::Dumper</a></h2>
<p>Serialization of references is done with Data::Dumper, therefore the nature
of data that can be assigned to encrypting fields is limited by what
Data::Dumper can grok. We set $Data::Dumper::Purity = 1, so
self-referential and recursive structures should be OK.</p>
<p>
</p>
<h2><a name="speed">Speed</a></h2>
<p>Tie::EncryptedHash'es keep their contents encrypted as much as possible, so
there's a rather severe speed penalty. With Blowfish, <code>STORE()</code> on
EncryptedHash can be upto 70 times slower than a standard perl hash.
Reference STORE()'es will be quicker, but speed gain will be adjusted at
FETCH(). <code>FETCH()</code> is about 35 times slower than a standard perl hash. DES
affords speed improvements of upto 2x, but is not considered secure for
long-term storage of data. These values were computed on a DELL PIII-300
Mhz notebook with 128 Mb RAM running perl 5.003 on Linux 2.2.16. Variations
in speed might be different on your machine.</p>
<p>
</p>
<hr />
<h1><a name="standard_usage">STANDARD USAGE</a></h1>
<p>The standard usage for this module would be something along the lines of:
populate Tie::EncryptedHash with sensitive data, delete the password,
serialize the encrypted hash with Data::Dumper, store the result on disk or
send it over the wire to another machine. Later, when the sensitive data is
required, procure the EncryptedHash, set the password and accesses the
encrypted data fields.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p>Data::Dumper(3),
Crypt::CBC(3),
Crypt::DES(3),
Crypt::Blowfish(3),
Tie::SecureHash(3)</p>
<p>
</p>
<hr />
<h1><a name="acknowledgements">ACKNOWLEDGEMENTS</a></h1>
<p>The framework of Tie::EncryptedHash derives heavily from Damian Conway's
Tie::SecureHash. Objects that are blessed as well as tied are just one of
the pleasant side-effects of stealing Damian's code. Thanks to Damian for
this brilliant module.</p>
<p>PacificNet (http://www.pacificnet.net) loaned me the aforementioned notebook
to hack from the comfort of my bed. Thanks folks!</p>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Vipul Ved Prakash <<a href="mailto:mail@vipul.net">mail@vipul.net</a>></p>
<p>
</p>
<hr />
<h1><a name="license">LICENSE</a></h1>
<p>This module is distributed under the same license as Perl itself.
</p>
</body>
</html>
( run in 0.536 second using v1.01-cache-2.11-cpan-39bf76dae61 )