{
    "mode": "perldoc",
    "parameter": "Crypt::Stream::Rabbit",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3AStream%3A%3ARabbit/json",
    "generated": "2026-10-06T06:12:10Z",
    "synopsis": "use Crypt::Stream::Rabbit;\n# encrypt\n$key = \"1234567890123456\";\n$iv  = \"12345678\";\n$stream = Crypt::Stream::Rabbit->new($key, $iv);\n$ct = $stream->crypt(\"plain message\");\n# decrypt\n$key = \"1234567890123456\";\n$iv  = \"12345678\";\n$stream = Crypt::Stream::Rabbit->new($key, $iv);\n$pt = $stream->crypt($ct);",
    "sections": {
        "NAME": {
            "content": "Crypt::Stream::Rabbit - Stream cipher Rabbit\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Crypt::Stream::Rabbit;\n\n# encrypt\n$key = \"1234567890123456\";\n$iv  = \"12345678\";\n$stream = Crypt::Stream::Rabbit->new($key, $iv);\n$ct = $stream->crypt(\"plain message\");\n\n# decrypt\n$key = \"1234567890123456\";\n$iv  = \"12345678\";\n$stream = Crypt::Stream::Rabbit->new($key, $iv);\n$pt = $stream->crypt($ct);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Provides an interface to the Rabbit stream cipher.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "new\n$stream = Crypt::Stream::Rabbit->new($key, $iv);\n# $key .. keylen must be up to 16 bytes\n# $iv  .. ivlen must be up to 8 bytes\n\n$stream = Crypt::Stream::Rabbit->new($key);\n#BEWARE: this is different from new($key, \"\")\n\ncrypt\n$ciphertext = $stream->crypt($plaintext);\n#or\n$plaintext = $stream->crypt($ciphertext);\n\nkeystream\n$randomkey = $stream->keystream($length);\n\nclone\n$stream->clone();\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "*   Crypt::Stream::RC4, Crypt::Stream::ChaCha, Crypt::Stream::Salsa20, Crypt::Stream::Sober128\n\n*   <https://en.wikipedia.org/wiki/Rabbit(cipher)>\n",
            "subsections": []
        }
    },
    "summary": "Crypt::Stream::Rabbit - Stream cipher Rabbit",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "Rabbit",
            "section": "cipher",
            "url": "https://www.chedong.com/phpMan.php/man/Rabbit/cipher/json"
        }
    ]
}