{
    "mode": "perldoc",
    "parameter": "GnuPG::Tie",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/GnuPG%3A%3ATie/json",
    "generated": "2026-06-09T12:57:08Z",
    "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 GNU Privacy Guard.\n\nGnuPG::Tie::Decrypt - Tied filehandle interface to decryption with the GNU 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 interface to\nencryption/decryption facilities of the GNU Privacy guard.\n\nWith GnuPG::Tie::Encrypt everything you write to the file handle will be encrypted. You can read\nthe ciphertext from the same file handle.\n\nWith GnuPG::Tie::Decrypt you may read the plaintext equivalent of a ciphertext. This is one can\nhave been written to file handle.\n\nAll options given to the tie constructor will be passed on to the underlying GnuPG object. You\ncan use a mix of options to output directly to a file or to read directly from a file, only\nremember than once you start 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 Francis J. Lacoste\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the\nGNU General Public License as published by the Free Software Foundation; either version 2 of the\nLicense, or (at your option) any later version.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "",
            "subsections": [
                {
                    "name": "gpg",
                    "content": ""
                }
            ]
        }
    },
    "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": []
}