{
    "mode": "perldoc",
    "parameter": "Net::Jabber::Key",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AJabber%3A%3AKey/json",
    "generated": "2026-06-13T10:17:19Z",
    "synopsis": "Net::Jabber::Key is a module that provides a developer easy access\nto generating, caching, and comparing keys.",
    "sections": {
        "NAME": {
            "content": "Net::Jabber::Key - Jabber Key Library\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "Net::Jabber::Key is a module that provides a developer easy access\nto generating, caching, and comparing keys.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Key.pm is a helper module for the Net::Jabber::Transport.  When the\nTransport talks to a Client it sends a key and expects to get that\nkey back from the Client.  This module provides an API to generate,\ncache, and then compare the key send from the Client.\n",
            "subsections": [
                {
                    "name": "Basic Functions",
                    "content": "$Key = new Net::Jabber::Key();\n\n$key = $Key->Generate();\n\n$key = $Key->Create(\"bob\\@jabber.org\");\n\n$test = $Key->Compare(\"bob\\@jabber.org\",\"some key\");\n"
                }
            ]
        },
        "METHODS": {
            "content": "",
            "subsections": [
                {
                    "name": "Basic Functions",
                    "content": "new(debug=>string,       - creates the Key object.  debug should\ndebugfh=>FileHandle,   be set to the path for the debug\ndebuglevel=>integer)   log to be written.  If set to \"stdout\"\nthen the debug will go there.  Also, you\ncan specify a filehandle that already\nexists and use that.  debuglevel controls\nthe amount of debug.  0 is none, 1 is\nnormal, 2 is all.\n\nGenerate() - returns a key in Digest SHA1 form based on the current\ntime and the PID.\n\nCreate(cacheString) - generates a key and caches it with the key\nof cacheString.  Create returns the key.\n\nCompare(cacheString, - compares the key stored in the cache under\nkeyString)     cacheString with the keyString.  Returns 1\nif they match, and 0 otherwise.\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "By Ryan Eatmon in May of 2000 for http://jabber.org.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "This module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "Net::Jabber::Key - Jabber Key Library",
    "flags": [],
    "examples": [],
    "see_also": []
}