<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Vivek Shukla - GPG</title>
    <subtitle>I am a Software Engineer from India. I am currently building Daestro. I work in Rust, Javascript and Python.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://vshukla.com/tags/gpg/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://vshukla.com/tags/gpg/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2025-03-18T00:00:00+00:00</updated>
    <id>https://vshukla.com/tags/gpg/atom.xml</id>
    <entry xml:lang="en">
        <title>Basic GPG</title>
        <published>2025-03-18T00:00:00+00:00</published>
        <updated>2025-03-18T00:00:00+00:00</updated>
        <author>
          <name>Vivek Shukla</name>
        </author>
        <link rel="alternate" type="text/html" href="https://vshukla.com/snippets/basic-gpg/"/>
        <id>https://vshukla.com/snippets/basic-gpg/</id>
        <summary type="html">Encrypt and decrypt files using GPG</summary>
        <content type="html" xml:base="https://vshukla.com/snippets/basic-gpg/">&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;# encryption&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; --batch --yes --passphrase&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;your-password&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; --symmetric&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; filename.ext&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;# OR read password from file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; password.txt&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; --batch --yes --passphrase-fd&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; --symmetric&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; filename.ext&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;# decryption&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; --batch --yes --passphrase&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;your-password&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; -o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; filename.ext&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; --decrypt&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; filename.ext.gpg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;# OR read password from file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; password.txt&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; --batch --yes --passphrase-fd&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; -o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; filename.ext&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-other&quot;&gt; --decrypt&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; filename.ext.gpg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
    </entry>
</feed>
