Re: Allowed characters in SRS Hash
Julian Mehnle <[email protected]> Sun, 13 Aug 2006 19:15:59 +0000
| Newsgroups | gmane.mail.spam.srs.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jean-Pierre Schwickerath wrote: > I wondered if it is possible to exclude certain characters from being > used where doing an SRS Hash with the Mail::SRS perl module? > On my first try the module generated a hash that contained a slash (/). > Unfortunately this character is not allowed in the local part with > Postfix as MTA, so the bounce did not come back. I'd suggest that you write a sub-class of Mail::SRS that overrides the hash_create() and hash_verify() methods (which use Digest::HMAC_SHA1:: b64digest() for the Base64 conversions) and substitutes any "/"s in the hash with another character, say ".". hash_verify() would have to do the reverse to the passed hash (i.e. undo the substitution before the hash is verified), of course. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFE33pvwL7PKlBZWjsRAnwHAKCH8Bcy6Fcz8xIgNZ/7Y/HRO92RSwCgvqYD FjgnjdoLskuUChJMPSjy15s= =7D24 -----END PGP SIGNATURE-----