08 Oct 2018 00:05:09 UTC
- Distribution: Object-Signature
- Module version: 1.08
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (3894 / 0 / 0)
- KwaliteeBus factor: 1
- 89.47% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity24 month
- Download (25.14KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- TO DO
- SEE ALSO
Object::Signature - Generate cryptographic signatures for objects
# In your module package My::Module use base 'Object::Signature'; # In outside code my $Object = My::Module->new; print "Object Signature: " . $Object->signature;
Object::Signature is an abstract base class that you can inherit from in order to allow your objects to generate unique cryptographic signatures.
The method used to generate the signature is based on Storable and Digest::MD5. The object is fed to
Storable::nfreezeto get a string, which is then passed to Digest::MD5::md5_hex to get a unique 32 character hexadecimal signature.
signaturemethod is the only method added to your class, and will generate a unique 32 hexadecimal signature for any object it is called on.
All bugs should be filed via the bug tracker at
For other issues, or commercial enhancement or support, contact the author.
Currently has to generate the entire Storable string before digesting it. Would be nice if there was a way to incrementally Storablise and Digest in one pass so that it becomes much more memory efficient for large objects.
Once the current (as of 2005) hashing controversy settles down, consider selecting a newer and more powerful hashing algorithm to replace MD5. Or offer alternatives depending on how important the security situation is, as MD5 is very fast (90 meg a second) and many more-secure ones are a lot slower (more than 10 times slower in some cases).
On our side is the fact we use Storable. It should be much harder to create collisions when you don't control the string, only the structure before it goes through Storable.
Adam Kennedy <firstname.lastname@example.org>
Copyright 2004 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Module Install Instructions
To install Object::Signature, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Object::Signature
For more information on module installation, please visit the detailed CPAN module installation guide.