NAME
Net::Jabber::Key - Jabber Key Library
SYNOPSIS
Net::Jabber::Key is a module that provides a developer easy accessto generating, caching, and comparing keys.
DESCRIPTION
Key.pm is a helper module for the Net::Jabber::Transport. When theTransport talks to a Client it sends a key and expects to get thatkey back from the Client. This module provides an API to generate,cache, and then compare the key send from the Client.
Basic Functions
$Key = new Net::Jabber::Key();$key = $Key->Generate();$key = $Key->Create("bob\@jabber.org");$test = $Key->Compare("bob\@jabber.org","some key");
METHODS
Basic Functions
new(debug=>string, - creates the Key object. debug shoulddebugfh=>FileHandle, be set to the path for the debugdebuglevel=>integer) log to be written. If set to "stdout"then the debug will go there. Also, youcan specify a filehandle that alreadyexists and use that. debuglevel controlsthe amount of debug. 0 is none, 1 isnormal, 2 is all.Generate() - returns a key in Digest SHA1 form based on the currenttime and the PID.Create(cacheString) - generates a key and caches it with the keyof cacheString. Create returns the key.Compare(cacheString, - compares the key stored in the cache underkeyString) cacheString with the keyString. Returns 1if they match, and 0 otherwise.
AUTHOR
By Ryan Eatmon in May of 2000 for http://jabber.org.
COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.