Apache::Wyrd::Services::Key is an Apache-resident crypto key (Blowfish).
< Perl >
< /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.