|
Apache::Wyrd::Services::Key - Apache-resident crypto key |
Apache::Wyrd::Services::Key - Apache-resident crypto key (Blowfish)
<Perl>
use strict;
use Apache::Wyrd::Services::Key;
Apache::Wyrd::Services::Key->instance();
</Perl>
A subclass of the Singleton class, the key is created using the
instance method, not the new method.
Generates a random cryptographic key (for Blowfish) for use with an
Apache::Wyrd::Services::CodeRing object. Designed to be used at
server startup in order to keep the key in shared memory. As the key is
never stored in a file and then changes on server restart, it cannot be
obtained trivially. This makes it suitable for storing state
information on the browser without exposing the internals of your
program.
If Blowfish is not available on your system, it will attempt Blowfish_PP (pure perl) before failing to compile.
Fixed keys are also possible. The instance method can also accept a string as an argument to use in place of a randomly-generated key.
In development environments, with frequent server restarts, it is advisable to use a fixed key to prevent your Form state and Login Cookies from becoming unusable.
(format: (returns) name (arguments after self))
instance ([scalar])key ([scalar])cypher ([scalar])Crypt::Blowfish/_PP object.
Unless a fixed key is used, any encrypted information is irretrievable on server restart.
Barry King <wyrd@nospam.wyrdwright.com>
Copyright 2002-2004 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd.
|
Apache::Wyrd::Services::Key - Apache-resident crypto key |