{
    "mode": "perldoc",
    "parameter": "GnuPG::Tie",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/GnuPG%3A%3ATie/json",
    "generated": "2026-05-30T10:09:55Z",
    "synopsis": "use GnuPG::Tie::Encrypt;\nuse GnuPG::Tie::Decrypt;\ntie *CIPHER, 'GnuPG::Tie::Encrypt', armor => 1, recipient => 'User';\nprint CIPHER <<EOF;\nThis is a secret\nEOF\nlocal $/ = undef;\nmy $ciphertext = <CIPHER>;\nclose CIPHER;\nuntie *CIPHER;\ntie *PLAINTEXT, 'GnuPG::Tie::Decrypt', passphrase => 'secret';\nprint PLAINTEXT $ciphertext;\nmy $plaintext = <PLAINTEXT>;\n# $plaintext should now contains 'This is a secret'\nclose PLAINTEXT;\nuntie *PLAINTEXT;",
    "sections": {
        "NAME": {
            "content": "GnuPG::Tie::Encrypt - Tied filehandle interface to encryption with the\nGNU Privacy Guard.\n\nGnuPG::Tie::Decrypt - Tied filehandle interface to decryption with the\nGNU Privacy Guard.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use GnuPG::Tie::Encrypt;\nuse GnuPG::Tie::Decrypt;\n\ntie *CIPHER, 'GnuPG::Tie::Encrypt', armor => 1, recipient => 'User';\nprint CIPHER <<EOF;\nThis is a secret\nEOF\nlocal $/ = undef;\nmy $ciphertext = <CIPHER>;\nclose CIPHER;\nuntie *CIPHER;\n\ntie *PLAINTEXT, 'GnuPG::Tie::Decrypt', passphrase => 'secret';\nprint PLAINTEXT $ciphertext;\nmy $plaintext = <PLAINTEXT>;\n\n# $plaintext should now contains 'This is a secret'\nclose PLAINTEXT;\nuntie *PLAINTEXT;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "GnuPG::Tie::Encrypt and GnuPG::Tie::Decrypt provides a tied file handle\ninterface to encryption/decryption facilities of the GNU Privacy guard.\n\nWith GnuPG::Tie::Encrypt everything you write to the file handle will be\nencrypted. You can read the ciphertext from the same file handle.\n\nWith GnuPG::Tie::Decrypt you may read the plaintext equivalent of a\nciphertext. This is one can have been written to file handle.\n\nAll options given to the tie constructor will be passed on to the\nunderlying GnuPG object. You can use a mix of options to output directly\nto a file or to read directly from a file, only remember than once you\nstart reading from the file handle you can't write to it anymore.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Francis J. Lacoste <francis.lacoste@Contre.COM>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (c) 1999, 2000 iNsu Innovations Inc. Copyright (c) 2001\nFrancis J. Lacoste\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the\nFree Software Foundation; either version 2 of the License, or (at your\noption) any later version.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "gpg(1) GnuPG(3)\n",
            "subsections": []
        }
    },
    "summary": "GnuPG::Tie::Encrypt - Tied filehandle interface to encryption with the GNU Privacy Guard.  GnuPG::Tie::Decrypt - Tied filehandle interface to decryption with the GNU Privacy Guard.",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "gpg",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gpg/1/json"
        },
        {
            "name": "GnuPG",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/GnuPG/3/json"
        }
    ]
}