1Object::Signature(3) User Contributed Perl Documentation Object::Signature(3)
2
3
4
6 Signature - Generate cryptographic signatures for objects
7
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
18 Object::Signature is an abstract base class that you can inherit from
19 in order to allow your objects to generate unique cryptographic signa‐
20 tures.
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 charac‐
25 ter hexidecimal signature.
26
28 signature
29
30 The "signature" method is the only method added to your class, and will
31 generate a unique 32 hexidecimal signature for any object it is called
32 on.
33
35 All bugs should be filed via the bug tracker at
36
37 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Object-Signature>
38
39 For other issues, or commercial enhancement or support, contact the
40 author.
41
43 Incremental Generation
44
45 Currently has to generate the entire Storable string before digesting
46 it. Would be nice if there was a way to incrementally Storablise and
47 Digest in one pass so that it becomes much more memory efficient for
48 large objects.
49
50 Strengthen the Digest Algorithm
51
52 Once the current (as of 2005) hashing controversy settles down, con‐
53 sider selecting a newer and more powerful hashing algorithm to replace
54 MD5. Or offer alternatives depending on how important the security sit‐
55 uation is, as MD5 is very fast (90 meg a second) and many more-secure
56 ones are a lot slower (more than 10 times slower in some cases).
57
58 On our side is the fact we use Storable. It should be much harder to
59 create collisions when you don't control the string, only the structure
60 before it goes through Storable.
61
63 Adam Kennedy <adamk@cpan.org>
64
66 Copyright 2004 - 2006 Adam Kennedy.
67
68 This program is free software; you can redistribute it and/or modify it
69 under the same terms as Perl itself.
70
71 The full text of the license can be found in the LICENSE file included
72 with this module.
73
74
75
76perl v5.8.8 2006-10-02 Object::Signature(3)