{
    "mode": "perldoc",
    "parameter": "Crypt::Stream::Sober128",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3AStream%3A%3ASober128/json",
    "generated": "2026-06-10T13:42:37Z",
    "synopsis": "use Crypt::Stream::Sober128;\n# encrypt\n$key = \"1234567890123456\";\n$iv  = \"123456789012\";\n$stream = Crypt::Stream::Sober128->new($key, $iv);\n$ct = $stream->crypt(\"plain message\");\n# decrypt\n$key = \"1234567890123456\";\n$iv  = \"123456789012\";\n$stream = Crypt::Stream::Sober128->new($key, $iv);\n$pt = $stream->crypt($ct);",
    "sections": {
        "NAME": {
            "content": "Crypt::Stream::Sober128 - Stream cipher Sober128\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Crypt::Stream::Sober128;\n\n# encrypt\n$key = \"1234567890123456\";\n$iv  = \"123456789012\";\n$stream = Crypt::Stream::Sober128->new($key, $iv);\n$ct = $stream->crypt(\"plain message\");\n\n# decrypt\n$key = \"1234567890123456\";\n$iv  = \"123456789012\";\n$stream = Crypt::Stream::Sober128->new($key, $iv);\n$pt = $stream->crypt($ct);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Provides an interface to the Sober128 stream cipher.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "new\n$stream = Crypt::Stream::Sober128->new($key, $iv);\n# $key .. keylen must be multiple of 4 bytes\n# $iv  .. ivlen must be multiple of 4 bytes\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::Sosemanuk\n\n*   <https://en.wikipedia.org/wiki/SOBER-128>\n",
            "subsections": []
        }
    },
    "summary": "Crypt::Stream::Sober128 - Stream cipher Sober128",
    "flags": [],
    "examples": [],
    "see_also": []
}