1Object::Signature(3)  User Contributed Perl Documentation Object::Signature(3)
2
3
4

NAME

6       Object::Signature - Generate cryptographic signatures for objects
7

SYNOPSIS

9         # In your module
10         package My::Module
11         use base 'Object::Signature';
12
13         # In outside code
14         my $Object = My::Module->new;
15         print "Object Signature: " . $Object->signature;
16

DESCRIPTION

18       Object::Signature is an abstract base class that you can inherit from
19       in order to allow your objects to generate unique cryptographic
20       signatures.
21
22       The method used to generate the signature is based on Storable and
23       Digest::MD5. The object is fed to "Storable::nfreeze" to get a string,
24       which is then passed to Digest::MD5::md5_hex to get a unique 32
25       character hexadecimal signature.
26

METHODS

28   signature
29       The "signature" method is the only method added to your class, and will
30       generate a unique 32 hexadecimal signature for any object it is called
31       on.
32

SUPPORT

34       All bugs should be filed via the bug tracker at
35
36       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Object-Signature>
37
38       For other issues, or commercial enhancement or support, contact the
39       author.
40

TO DO

42   Incremental Generation
43       Currently has to generate the entire Storable string before digesting
44       it. Would be nice if there was a way to incrementally Storablise and
45       Digest in one pass so that it becomes much more memory efficient for
46       large objects.
47
48   Strengthen the Digest Algorithm
49       Once the current (as of 2005) hashing controversy settles down,
50       consider selecting a newer and more powerful hashing algorithm to
51       replace MD5. Or offer alternatives depending on how important the
52       security situation is, as MD5 is very fast (90 meg a second) and many
53       more-secure ones are a lot slower (more than 10 times slower in some
54       cases).
55
56       On our side is the fact we use Storable. It should be much harder to
57       create collisions when you don't control the string, only the structure
58       before it goes through Storable.
59

AUTHOR

61       Adam Kennedy <adamk@cpan.org>
62

SEE ALSO

64       Object::Signature::File, <http://ali.as/>
65
67       Copyright 2004 - 2011 Adam Kennedy.
68
69       This program is free software; you can redistribute it and/or modify it
70       under the same terms as Perl itself.
71
72       The full text of the license can be found in the LICENSE file included
73       with this module.
74
75
76
77perl v5.30.1                      2020-01-30              Object::Signature(3)
Impressum