<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>AyeeNotion’s Blog</title>
        <link>http://preview.tangly1024.com/</link>
        <description>一个NotionNext搭建的博客</description>
        <lastBuildDate>Fri, 05 Jun 2026 04:24:27 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en-US</language>
        <copyright>All rights reserved 2026, ayee</copyright>
        <item>
            <title><![CDATA[03-GPDB源码编译-CENTOS7.4]]></title>
            <link>http://preview.tangly1024.com/article/3758d88b-b050-8069-8ee8-ef2c330362b0</link>
            <guid>http://preview.tangly1024.com/article/3758d88b-b050-8069-8ee8-ef2c330362b0</guid>
            <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3758d88bb05080698ee8ef2c330362b0"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3758d88bb05080c68a4cfce8aa3ee3bc" data-id="3758d88bb05080c68a4cfce8aa3ee3bc"><span><div id="3758d88bb05080c68a4cfce8aa3ee3bc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080c68a4cfce8aa3ee3bc" title="参考"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">参考</span></span></h3><div class="notion-text notion-block-3758d88bb05080599586d15241a2812a"><a class="notion-link" href="https://github.com/greenplum-db/gpdb" target="_blank" rel="noopener noreferrer">greenplum-db/gpdb</a></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3758d88bb05080c489c7d63f6bcde9e9" data-id="3758d88bb05080c489c7d63f6bcde9e9"><span><div id="3758d88bb05080c489c7d63f6bcde9e9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080c489c7d63f6bcde9e9" title="拉取代码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">拉取代码</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3758d88bb05080f394e1cb51012c6d42" data-id="3758d88bb05080f394e1cb51012c6d42"><span><div id="3758d88bb05080f394e1cb51012c6d42" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080f394e1cb51012c6d42" title="CENTOS7.4依赖安装--脚本安装【./README.CentOS.bash】"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">CENTOS7.4依赖安装--脚本安装【./README.CentOS.bash】</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3758d88bb050809fa56ec496d2ad2a8e" data-id="3758d88bb050809fa56ec496d2ad2a8e"><span><div id="3758d88bb050809fa56ec496d2ad2a8e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050809fa56ec496d2ad2a8e" title="配置/etc/ld.so.conf"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">配置/etc/ld.so.conf</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3758d88bb050805fb0addcb45c4a15c9" data-id="3758d88bb050805fb0addcb45c4a15c9"><span><div id="3758d88bb050805fb0addcb45c4a15c9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050805fb0addcb45c4a15c9" title="配置用户【./setup_gpadmin_user.bash】"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">配置用户【./setup_gpadmin_user.bash】</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3758d88bb0508091b893e7410277c211" data-id="3758d88bb0508091b893e7410277c211"><span><div id="3758d88bb0508091b893e7410277c211" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508091b893e7410277c211" title="Build the database"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Build the database</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3758d88bb05080828a6ee79a8a1160ff" data-id="3758d88bb05080828a6ee79a8a1160ff"><span><div id="3758d88bb05080828a6ee79a8a1160ff" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080828a6ee79a8a1160ff" title="问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">问题</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3758d88bb05080308ac0ff104d1a3f19" data-id="3758d88bb05080308ac0ff104d1a3f19"><span><div id="3758d88bb05080308ac0ff104d1a3f19" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080308ac0ff104d1a3f19" title="configure: error: *** A compiler with support for C++14 language features is required."><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">configure: error: *** A compiler with support for C++14 language features is required.</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3758d88bb05080859d8af0213fd93ba1" data-id="3758d88bb05080859d8af0213fd93ba1"><span><div id="3758d88bb05080859d8af0213fd93ba1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080859d8af0213fd93ba1" title="方案 1"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">方案 1</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3758d88bb0508015a996e5f20948538b" data-id="3758d88bb0508015a996e5f20948538b"><span><div id="3758d88bb0508015a996e5f20948538b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508015a996e5f20948538b" title="方案 2"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">方案 2</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3758d88bb05080eda533d73e2c6e0009" data-id="3758d88bb05080eda533d73e2c6e0009"><span><div id="3758d88bb05080eda533d73e2c6e0009" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080eda533d73e2c6e0009" title="error: header file &lt;Python.h&gt; is required for Python"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">error: header file &lt;Python.h&gt; is required for Python</span></span></h4></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[oushuDB之目录结构介绍]]></title>
            <link>http://preview.tangly1024.com/article/3758d88b-b050-80b0-8fbd-fbcc8bc4897f</link>
            <guid>http://preview.tangly1024.com/article/3758d88b-b050-80b0-8fbd-fbcc8bc4897f</guid>
            <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3758d88bb05080b08fbdfbcc8bc4897f"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb0508073ba90c0d68f539d8e" data-id="3758d88bb0508073ba90c0d68f539d8e"><span><div id="3758d88bb0508073ba90c0d68f539d8e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508073ba90c0d68f539d8e" title="HDFS目录结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">HDFS目录结构</span></span></h2><table class="notion-simple-table notion-block-3758d88bb050800f88b9da091c12c42a"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3758d88bb05080a694f7fc3a47b981b4"><td class="" style="width:120px"><div class="notion-simple-table-cell">参数</div></td><td class="" style="width:55px"><div class="notion-simple-table-cell">说明</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">示例</div></td><td class="" style="width:157.125px"><div class="notion-simple-table-cell">配置文件</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb050804d8a5bf365e01d39b0"><td class="" style="width:120px"><div class="notion-simple-table-cell">dataDir</div></td><td class="" style="width:55px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/data1/zookeeper/data</div></td><td class="" style="width:157.125px"><div class="notion-simple-table-cell">zoo.cfg</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080639dd3cdae3bc577d2"><td class="" style="width:120px"><div class="notion-simple-table-cell">HADOOP_CONF_DIR</div></td><td class="" style="width:55px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/etc/hadoop/conf</div></td><td class="" style="width:157.125px"><div class="notion-simple-table-cell"><a class="notion-link" href="http://hadoop-env.sh/" target="_blank" rel="noopener noreferrer">hadoop-env.sh</a></div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb050808b83dbc78b8999d5d4"><td class="" style="width:120px"><div class="notion-simple-table-cell">HADOOP_LOG_DIR</div></td><td class="" style="width:55px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/var/log/hadoop/$USER</div></td><td class="" style="width:157.125px"><div class="notion-simple-table-cell"><a class="notion-link" href="http://hadoop-env.sh/" target="_blank" rel="noopener noreferrer">hadoop-env.sh</a></div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080b2ae39c1af75cfbe98"><td class="" style="width:120px"><div class="notion-simple-table-cell">dfs.name.dir</div></td><td class="" style="width:55px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">file:/data1/hdfs/namenode</div></td><td class="" style="width:157.125px"><div class="notion-simple-table-cell">hdfs-site.xml</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb050801bbb54cb940a29615a"><td class="" style="width:120px"><div class="notion-simple-table-cell">dfs.data.dir</div></td><td class="" style="width:55px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">file:/data1/hdfs/datanode</div></td><td class="" style="width:157.125px"><div class="notion-simple-table-cell">hdfs-site.xml</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb050809a99dfe50cb5edb8e0"><td class="" style="width:120px"><div class="notion-simple-table-cell">dfs.journalnode.edits.dir</div></td><td class="" style="width:55px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/data1/hdfs/journaldata</div></td><td class="" style="width:157.125px"><div class="notion-simple-table-cell">hdfs-site.xml</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080838a84e2fc40bf6e0c"><td class="" style="width:120px"><div class="notion-simple-table-cell">dfs.domain.socket.path</div></td><td class="" style="width:55px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/var/lib/hadoop-hdfs/dn_socket</div></td><td class="" style="width:157.125px"><div class="notion-simple-table-cell">hdfs-site.xml</div></td></tr></tbody></table><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb0508009a74ce2da18006ce5" data-id="3758d88bb0508009a74ce2da18006ce5"><span><div id="3758d88bb0508009a74ce2da18006ce5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508009a74ce2da18006ce5" title="HAWQ目录结构说明"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">HAWQ目录结构说明</span></span></h2><table class="notion-simple-table notion-block-3758d88bb05080b99859f1d529ba885f"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3758d88bb05080198cb7ed38f94c57b3"><td class="" style="width:257.6640625px"><div class="notion-simple-table-cell">参数</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">说明</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">示例</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080578533c4f100c87917"><td class="" style="width:257.6640625px"><div class="notion-simple-table-cell">hawq_dfs_url</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">存储TABLE等业务数据</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">oushu/hawq/default_filespace</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb050805faf09e94037684601"><td class="" style="width:257.6640625px"><div class="notion-simple-table-cell">hawq_master_directory</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">1.存储表结构等catalog元数据
2.存储log
3.......</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/data1/hawq/masterdd</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb050807f86e3e71d73aa5cfc"><td class="" style="width:257.6640625px"><div class="notion-simple-table-cell">hawq_segment_directory</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/data1/hawq/segmentdd</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080bcab54f07ee7c7272e"><td class="" style="width:257.6640625px"><div class="notion-simple-table-cell">hawq_master_temp_directory</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">用于存放计算的中间数据</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/data1/hawq/tmp</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080d7bd45df84118a3986"><td class="" style="width:257.6640625px"><div class="notion-simple-table-cell">hawq_segment_temp_directory</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">用于存放计算的中间数据</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">/data1/hawq/tmp</div></td></tr></tbody></table><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb0508045a627e7e70183571c" data-id="3758d88bb0508045a627e7e70183571c"><span><div id="3758d88bb0508045a627e7e70183571c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508045a627e7e70183571c" title="TABLE存储方式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">TABLE存储方式</span></span></h2></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[oushuDB之IDLE in transaction]]></title>
            <link>http://preview.tangly1024.com/article/3758d88b-b050-8026-be7e-c5e1d38e29b6</link>
            <guid>http://preview.tangly1024.com/article/3758d88b-b050-8026-be7e-c5e1d38e29b6</guid>
            <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3758d88bb0508026be7ec5e1d38e29b6"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-3758d88bb0508032b780c93aa1477bbd" data-id="3758d88bb0508032b780c93aa1477bbd"><span><div id="3758d88bb0508032b780c93aa1477bbd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508032b780c93aa1477bbd" title="基本信息"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">基本信息</span></span></h4><blockquote class="notion-quote notion-block-3758d88bb05080feb432ebc4b879fe64"><div>系统 : CentOS Linux release 7.4.1708 (Core)
产品 : OushuDB
模块 : DB
子模块 : -</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-3758d88bb05080bf86cdcc5f625bcbfa" data-id="3758d88bb05080bf86cdcc5f625bcbfa"><span><div id="3758d88bb05080bf86cdcc5f625bcbfa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080bf86cdcc5f625bcbfa" title="描述详述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">描述详述</span></span></h4><blockquote class="notion-quote notion-block-3758d88bb05080ff8b6ff8bfde9b0268"><div>OushuDB出现大量 &lt;IDLE&gt; in transaction</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-3758d88bb05080e383f2ed56c3773105" data-id="3758d88bb05080e383f2ed56c3773105"><span><div id="3758d88bb05080e383f2ed56c3773105" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080e383f2ed56c3773105" title="原因"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">原因</span></span></h4><blockquote class="notion-quote notion-block-3758d88bb05080c9a542f7238b273700"><div>事务开启没有关闭,未及时释放资源</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-3758d88bb05080a1b63bf1da64a7e394" data-id="3758d88bb05080a1b63bf1da64a7e394"><span><div id="3758d88bb05080a1b63bf1da64a7e394" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080a1b63bf1da64a7e394" title="解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">解决方案</span></span></h4><blockquote class="notion-quote notion-block-3758d88bb0508080aa52d7dca3e3d2b8"><div>建议研发代码加上关闭事务</div></blockquote></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[oushuDB之too many clients already]]></title>
            <link>http://preview.tangly1024.com/article/3758d88b-b050-80cd-913b-dc7bdd9e3fc4</link>
            <guid>http://preview.tangly1024.com/article/3758d88b-b050-80cd-913b-dc7bdd9e3fc4</guid>
            <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3758d88bb05080cd913bdc7bdd9e3fc4"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-3758d88bb05080718635fae1ddba101e" data-id="3758d88bb05080718635fae1ddba101e"><span><div id="3758d88bb05080718635fae1ddba101e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080718635fae1ddba101e" title="基本信息"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">基本信息</span></span></h4><blockquote class="notion-quote notion-block-3758d88bb05080f8b6ececfc557e4f88"><div>系统     : CentOS Linux release 7.4.1708 (Core)
产品     : OushuDB
模块     : DB
子模块 : -</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-3758d88bb05080f893f2d6f5ad8c80c7" data-id="3758d88bb05080f893f2d6f5ad8c80c7"><span><div id="3758d88bb05080f893f2d6f5ad8c80c7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080f893f2d6f5ad8c80c7" title="描述详述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">描述详述</span></span></h4><blockquote class="notion-quote notion-block-3758d88bb050800f9c10c2872065095b"><div>同一时刻SQL个数太多</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-3758d88bb05080a5a0e6d8cb5468c020" data-id="3758d88bb05080a5a0e6d8cb5468c020"><span><div id="3758d88bb05080a5a0e6d8cb5468c020" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080a5a0e6d8cb5468c020" title="原因"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">原因</span></span></h4><blockquote class="notion-quote notion-block-3758d88bb050802f87daf8f35ca9c3ab"><div>单个SQL毫秒级别,但是SQL数量巨大(一天是3611个SQL;3611 * 365 * 2 = 2636030 个SQL )</div><div class="notion-text notion-block-3758d88bb050806fa532ea7824db0021">当并发太大;会出现too many clients already ；目前max_connections=1280；目前我给到了10000</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-3758d88bb050808db812e4ec01718062" data-id="3758d88bb050808db812e4ec01718062"><span><div id="3758d88bb050808db812e4ec01718062" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050808db812e4ec01718062" title="解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">解决方案</span></span></h4><blockquote class="notion-quote notion-block-3758d88bb05080c7b02fd431250ad471"><div>适当调整max_connections</div></blockquote><hr class="notion-hr notion-block-3758d88bb05080539e12eab77b7cd07c"/></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[oushuDB之standby同步失败(syncmaster not running)原理解析以及修复过程]]></title>
            <link>http://preview.tangly1024.com/article/3758d88b-b050-80c5-a4bc-d9c8c9484f53</link>
            <guid>http://preview.tangly1024.com/article/3758d88b-b050-80c5-a4bc-d9c8c9484f53</guid>
            <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3758d88bb05080c5a4bcd9c8c9484f53"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb05080049b61c91daf7b2dbe" data-id="3758d88bb05080049b61c91daf7b2dbe"><span><div id="3758d88bb05080049b61c91daf7b2dbe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080049b61c91daf7b2dbe" title="背景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">背景</span></span></h2><div class="notion-text notion-block-3758d88bb05080f2b881ff3761e15ca5">该文章记录的是oushuDB在一次常规修复失败后的修复方法以及部分底层的逻辑解析</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb050808796a6c30199a117af" data-id="3758d88bb050808796a6c30199a117af"><span><div id="3758d88bb050808796a6c30199a117af" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050808796a6c30199a117af" title="oushuDB同步失败原因分析过程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">oushuDB同步失败原因分析过程</span></span></h2><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3758d88bb05080d5a08bf84ce60245ff"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://leanote.com/api/file/getImage?fileId=6660260fab644148454c1681&amp;spaceId=3d5cacde-8ba5-41b7-8963-2d9777bfd094&amp;t=3758d88b-b050-80d5-a08b-f84ce60245ff" alt="title" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb0508058bea5e28e4a69be3d" data-id="3758d88bb0508058bea5e28e4a69be3d"><span><div id="3758d88bb0508058bea5e28e4a69be3d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508058bea5e28e4a69be3d" title="Standby底层修复顺序"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Standby底层修复顺序</span></span></h2><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3758d88bb0508099a3d8dbb5e1f46010"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://leanote.com/api/file/getImage?fileId=6660261bab644148454c1683&amp;spaceId=3d5cacde-8ba5-41b7-8963-2d9777bfd094&amp;t=3758d88b-b050-8099-a3d8-dbb5e1f46010" alt="title" loading="lazy" decoding="async"/></div></figure></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[oushuDB之pgcrypto加密解密]]></title>
            <link>http://preview.tangly1024.com/article/3758d88b-b050-80b8-954c-ec86eb9b783a</link>
            <guid>http://preview.tangly1024.com/article/3758d88b-b050-80b8-954c-ec86eb9b783a</guid>
            <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3758d88bb05080b8954cec86eb9b783a"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb05080e88a6ec99d894f1e27" data-id="3758d88bb05080e88a6ec99d894f1e27"><span><div id="3758d88bb05080e88a6ec99d894f1e27" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080e88a6ec99d894f1e27" title="参考"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">参考</span></span></h2><div class="notion-text notion-block-3758d88bb050800ca624f405f5414e68"><a class="notion-link" href="https://www.postgresql.org/docs/8.3/pgcrypto.html" target="_blank" rel="noopener noreferrer">PGCRYPTO</a></div><div class="notion-text notion-block-3758d88bb0508017a0e4f11dfd8c1100"><a class="notion-link" href="https://developer.aliyun.com/article/58377" target="_blank" rel="noopener noreferrer">固若金汤 - PostgreSQL pgcrypto加密插件</a></div><div class="notion-text notion-block-3758d88bb05080c58f67c225e705ec77"><a class="notion-link" href="https://blog.csdn.net/dazuiba008/article/details/79641321" target="_blank" rel="noopener noreferrer">Postgresql数据加密函数介绍</a></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb0508057acf3d9e1960f3144" data-id="3758d88bb0508057acf3d9e1960f3144"><span><div id="3758d88bb0508057acf3d9e1960f3144" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508057acf3d9e1960f3144" title="pgcrypto安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">pgcrypto安装</span></span></h2><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3758d88bb05080dfb549e4961a2b1489" data-id="3758d88bb05080dfb549e4961a2b1489"><span><div id="3758d88bb05080dfb549e4961a2b1489" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080dfb549e4961a2b1489" title="功能介绍"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">功能介绍</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3758d88bb050804bb4cdf166bae179fd" data-id="3758d88bb050804bb4cdf166bae179fd"><span><div id="3758d88bb050804bb4cdf166bae179fd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050804bb4cdf166bae179fd" title="digest()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">digest()</span></span></h3><div class="notion-text notion-block-3758d88bb050809cad08f80fae2b7b89">根据给定的算法获取给定数据的hash值。</div><div class="notion-text notion-block-3758d88bb0508017b95cc6f62fa900c4"><b>标准算法支持有md5、sha1、sha224、sha256、sha384和sha512</b></div><div class="notion-text notion-block-3758d88bb050807f9d52e1dceb30800e">e.g.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3758d88bb050800ea3d2d9f33b87af2d" data-id="3758d88bb050800ea3d2d9f33b87af2d"><span><div id="3758d88bb050800ea3d2d9f33b87af2d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050800ea3d2d9f33b87af2d" title="hmac()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">hmac()</span></span></h3><div class="notion-text notion-block-3758d88bb050804e8f17e2665a0784dd">用key计算hash值，type和digest一样，hmac和digest类似，但是只有知道key的情况下才能计算出哈希值，
这样可以预防更改数据以及更改哈希匹配的情况，如果key大于hash block size，那么先计算哈希值，哈希值作为key使用</div><div class="notion-text notion-block-3758d88bb050803d9a6dc426ff1238a1">e.g.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3758d88bb050800da7e9c5dab8c9b8b7" data-id="3758d88bb050800da7e9c5dab8c9b8b7"><span><div id="3758d88bb050800da7e9c5dab8c9b8b7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050800da7e9c5dab8c9b8b7" title="密码哈希函数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">密码哈希函数</span></span></h3><div class="notion-text notion-block-3758d88bb05080c99726e2b564575da5"><b>crypt()用来计算hash值.</b></div><div class="notion-text notion-block-3758d88bb050802597c3fcd71061804c"><b>gen_salt()随机产生一个值作为crypt()的算法参数.</b></div><div class="notion-text notion-block-3758d88bb0508092ac4af754f0da88bc">gen_salt()的type参数为des, xdes, md5, bf.   </div><div class="notion-text notion-block-3758d88bb050804d8e73c230f9b6644f">gen_salt()的iter_count指迭代次数, 数字越大加密时间越长, 被破解需要的时间也越长.</div><div class="notion-text notion-block-3758d88bb050806389a3f54e32b865e4">crypt()和gen_salt()的组合主要是提高了逆向破解的难度, 增强了数据的安全性</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb0508004a0cde6a76f2887f1" data-id="3758d88bb0508004a0cde6a76f2887f1"><span><div id="3758d88bb0508004a0cde6a76f2887f1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508004a0cde6a76f2887f1" title="crypt()支持的算法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">crypt()支持的算法</span></span></h4><table class="notion-simple-table notion-block-3758d88bb0508020844dc84d70a4f3b5"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3758d88bb05080d5bddcda4d24c852e5"><td class="" style="width:120px"><div class="notion-simple-table-cell">算法</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">最大密码长度</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">适应?</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Salt bits</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">描述</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080058f28d87223a3029f"><td class="" style="width:120px"><div class="notion-simple-table-cell">bf</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">72</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Yes</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">128</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Blowfish-based, variant 2a</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb0508093a77ce1bcc024dfac"><td class="" style="width:120px"><div class="notion-simple-table-cell">md5</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">unlimited</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">No</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">48</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">MD5-based crypt</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080a89469cfc5ed35dca0"><td class="" style="width:120px"><div class="notion-simple-table-cell">xdes</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">8</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Yes</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">24</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Extended DES</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb0508018b4d8da2ba4f75696"><td class="" style="width:120px"><div class="notion-simple-table-cell">des</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">8</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">No</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">12</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Original UNIX crypt</div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080088fa5c7bd46a6a4ab" data-id="3758d88bb05080088fa5c7bd46a6a4ab"><span><div id="3758d88bb05080088fa5c7bd46a6a4ab" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080088fa5c7bd46a6a4ab" title="crypt()迭代次数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">crypt()迭代次数</span></span></h4><table class="notion-simple-table notion-block-3758d88bb05080f0b337e8a50a9a9d75"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3758d88bb050805a9884eff8729ea4f6"><td class="" style="width:120px"><div class="notion-simple-table-cell">算法</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">默认</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">最小值</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">最大值</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb0508049997fe9f8d15a18d1"><td class="" style="width:120px"><div class="notion-simple-table-cell">xdes</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">725</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">1</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">16777215</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080b6a4f4c6b75fc30183"><td class="" style="width:120px"><div class="notion-simple-table-cell">bf</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">8</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">4</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">31</div></td></tr></tbody></table><ul class="notion-list notion-list-disc notion-block-3758d88bb05080afbf9dfe33a55b2b13"><li>xdes额外限制，只能是奇数</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080978b56dbd42836328c" data-id="3758d88bb05080978b56dbd42836328c"><span><div id="3758d88bb05080978b56dbd42836328c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080978b56dbd42836328c" title="hash算法速度"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">hash算法速度</span></span></h4><table class="notion-simple-table notion-block-3758d88bb050808bbf62d484fa7c9c85"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3758d88bb05080109e9fdd5282d80d9b"><td class="" style="width:120px"><div class="notion-simple-table-cell">算法</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Hashes/sec</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">For <code class="notion-inline-code">[a-z]</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">For <code class="notion-inline-code">[A-Za-z0-9]</code></div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080e0be14fe5325923a4b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">crypt-bf/8</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">28</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">246 years</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">251322 years</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb050807e80d8db142781f6c0"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">crypt-bf/7</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">57</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">121 years</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">123457 years</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080bab0f5c715c3ed4146"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">crypt-bf/6</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">112</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">62 years</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">62831 years</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080beb20acd8abd34280a"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">crypt-bf/5</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">211</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">33 years</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">33351 years</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080fca4dcea37c527d511"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">crypt-md5</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">2681</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">2.6 years</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">2625 years</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb0508000beaceafc98f51e78"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">crypt-des</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">362837</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">7 days</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">19 years</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080658bd0d3576b639824"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">sha1</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">590223</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">4 days</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">12 years</div></td></tr><tr class="notion-simple-table-row notion-block-3758d88bb05080ce9d52d87d76e30240"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">md5</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">2345086</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">1 day</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">3 years</div></td></tr></tbody></table><div class="notion-text notion-block-3758d88bb0508082b14ddda995076778"><b>crypt和gen_salt是以牺牲hash速度为代价来换取安全性的</b></div><div class="notion-text notion-block-3758d88bb05080cfa5b2ccff234356df">e.g.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3758d88bb050801b88e6ddc6a58e886b" data-id="3758d88bb050801b88e6ddc6a58e886b"><span><div id="3758d88bb050801b88e6ddc6a58e886b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050801b88e6ddc6a58e886b" title="PGP 加密函数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">PGP 加密函数</span></span></h3><div class="notion-text notion-block-3758d88bb05080d4a1ccfacaafbf71ea">该功能实现了部分OpenPGP (RFC 4880)标准的加密。支持<b>对称秘钥</b>和<b>公共秘钥</b>的加密。</div><div class="notion-text notion-block-3758d88bb0508054b749eb2b137266f5">一条加密的PGP消息包含2个部分，或数据包：</div><ul class="notion-list notion-list-disc notion-block-3758d88bb0508014b0d4c9956636c35f"><li>数据包包含一个会话秘钥—加密了的对称秘钥或者是公共秘钥。</li></ul><ul class="notion-list notion-list-disc notion-block-3758d88bb05080c3baf8c1f66474cb3d"><li>数据包包含带有会话秘钥的加密数据。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb050809abd86d0baaa79ee4d" data-id="3758d88bb050809abd86d0baaa79ee4d"><span><div id="3758d88bb050809abd86d0baaa79ee4d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050809abd86d0baaa79ee4d" title="公共秘钥"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">公共秘钥</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb0508076a5cccdb7b3668684" data-id="3758d88bb0508076a5cccdb7b3668684"><span><div id="3758d88bb0508076a5cccdb7b3668684" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508076a5cccdb7b3668684" title="pgp_key_id()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">pgp_key_id()</span></span></h4><div class="notion-text notion-block-3758d88bb050804f9c9ece8e33a188c3"><code class="notion-inline-code">pgp_key_id</code>抽取一个 PGP 公钥或私钥的密钥 ID。或者如果给定了一个加密过的消息，它给出一个用来加密数据的密钥 ID。</div><div class="notion-text notion-block-3758d88bb0508010a6d3e90a6454c999">它能够返回 2 个特殊密钥 ID：</div><ul class="notion-list notion-list-disc notion-block-3758d88bb05080d2871afa552f5b4aa8"><li><code class="notion-inline-code">SYMKEY</code></li><ul class="notion-list notion-list-disc notion-block-3758d88bb05080d2871afa552f5b4aa8"><div class="notion-text notion-block-3758d88bb05080828294da784dbe90a4">该消息是用一个对称密钥加密的。</div></ul></ul><ul class="notion-list notion-list-disc notion-block-3758d88bb05080fd9aa3ccb33ed09cc8"><li><code class="notion-inline-code">ANYKEY</code></li><ul class="notion-list notion-list-disc notion-block-3758d88bb05080fd9aa3ccb33ed09cc8"><div class="notion-text notion-block-3758d88bb050805f8915d12463627112">该消息是用公钥加密的，但是密钥 ID 已经被移除。这意味着你将需要尝试你所有的密钥来看看哪个能解密该消息。<code class="notion-inline-code">pgcrypto</code>本身不产生这样的消息。</div></ul></ul><div class="notion-text notion-block-3758d88bb05080168f84c48f959262f8">注意不同的密钥可能具有相同的 ID。这很少见但是是一种正常事件。客户端应用则应该尝试用每一个去解密，看看哪个合适 — 像处理<code class="notion-inline-code">ANYKEY</code>一样</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080138fd5f75166a6a390" data-id="3758d88bb05080138fd5f75166a6a390"><span><div id="3758d88bb05080138fd5f75166a6a390" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080138fd5f75166a6a390" title="armor(), dearmor()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">armor(), dearmor()</span></span></h4><div class="notion-text notion-block-3758d88bb05080d89f11f4fa783a373f">这些函数把二进制数据包装/解包成 PGP ASCII-armored 格式，其基本上是带有 CRC 和额外格式化的 Base64。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080509b1bf5deb75683ef" data-id="3758d88bb05080509b1bf5deb75683ef"><span><div id="3758d88bb05080509b1bf5deb75683ef" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080509b1bf5deb75683ef" title="pgp_pub_encrypt()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">pgp_pub_encrypt()</span></span></h4><div class="notion-text notion-block-3758d88bb050800a85c3dcf3c8b9e495">用一个公共 PGP 密钥 <code class="notion-inline-code">key</code>加密<code class="notion-inline-code">data</code>。给这个函数一个私钥会产生一个错误。</div><div class="notion-text notion-block-3758d88bb05080aba748fab2b6313d6d"><code class="notion-inline-code">options</code>参数可以包含下文所述的选项设置</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080b684a5d413be4fd771" data-id="3758d88bb05080b684a5d413be4fd771"><span><div id="3758d88bb05080b684a5d413be4fd771" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080b684a5d413be4fd771" title="pgp_pub_decrypt()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">pgp_pub_decrypt()</span></span></h4><div class="notion-text notion-block-3758d88bb05080c586eddb7958550862">解密一个公共密钥加密的消息。<code class="notion-inline-code">key</code>必须是对应于用来加密的公钥的私钥。如果私钥是用口令保护的，你必须在<code class="notion-inline-code">psw</code>中给出该口令。如果没有口令，但你想要指定选项，你需要给出一个空口令。</div><div class="notion-text notion-block-3758d88bb05080b88714d874b37e287f">不允许使用<code class="notion-inline-code">pgp_pub_decrypt</code>解密<code class="notion-inline-code">bytea</code>数据。这是为了避免输出非法的字符数据。使用<code class="notion-inline-code">pgp_pub_decrypt_bytea</code>解密原始文本数据是好的。</div><div class="notion-text notion-block-3758d88bb05080c3afb1f8381a164563"><code class="notion-inline-code">options</code>参数可以包含下文所述的选项设置。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080fbb7c0ef5ec69f6b69" data-id="3758d88bb05080fbb7c0ef5ec69f6b69"><span><div id="3758d88bb05080fbb7c0ef5ec69f6b69" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080fbb7c0ef5ec69f6b69" title="使用举例"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用举例</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080829a2cff68901f3249" data-id="3758d88bb05080829a2cff68901f3249"><span><div id="3758d88bb05080829a2cff68901f3249" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080829a2cff68901f3249" title="对称秘钥"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">对称秘钥</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080c2809fc6b79389bf78" data-id="3758d88bb05080c2809fc6b79389bf78"><span><div id="3758d88bb05080c2809fc6b79389bf78" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080c2809fc6b79389bf78" title="pgp_sym_encrypt()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">pgp_sym_encrypt()</span></span></h4><div class="notion-text notion-block-3758d88bb05080a2bde6c03a19eb0273">带有一个对称的PGP秘钥<code class="notion-inline-code">psw</code>加密<code class="notion-inline-code">data</code>。 <code class="notion-inline-code">options</code>参数可以包含选项设置。</div><div class="notion-text notion-block-3758d88bb05080f0acebf34179fd3c0d">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb050807eb2aaf7791e68c17f" data-id="3758d88bb050807eb2aaf7791e68c17f"><span><div id="3758d88bb050807eb2aaf7791e68c17f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050807eb2aaf7791e68c17f" title="pgp_sym_decrypt()"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">pgp_sym_decrypt()</span></span></h4><div class="notion-text notion-block-3758d88bb05080e4930ae1534df720fe">解密一个对称秘钥加密的PGP消息。</div><div class="notion-text notion-block-3758d88bb05080f5b49fe58f59f097ac">用<code class="notion-inline-code">pgp_sym_decrypt</code>解密<code class="notion-inline-code">bytea</code>数据是不允许的。 </div><div class="notion-text notion-block-3758d88bb050804b8368c77bd1fb2acb">这是为了避免输出不合法的字符数据。</div><div class="notion-text notion-block-3758d88bb0508051ab59eb4ef01d9868">用<code class="notion-inline-code">pgp_sym_decrypt_bytea</code> 解密原始的文本数据是可以的。</div><div class="notion-text notion-block-3758d88bb05080c0a09de1ecfe176b63"><code class="notion-inline-code">options</code>参数可以包含选项设置。</div><div class="notion-text notion-block-3758d88bb050801ba9caedc57b0da530">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb0508024a778cfec421460fa" data-id="3758d88bb0508024a778cfec421460fa"><span><div id="3758d88bb0508024a778cfec421460fa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508024a778cfec421460fa" title="PGP功能的选项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">PGP功能的选项</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080ffbc98f217e30c59b5" data-id="3758d88bb05080ffbc98f217e30c59b5"><span><div id="3758d88bb05080ffbc98f217e30c59b5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080ffbc98f217e30c59b5" title="compress-algo"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">compress-algo</span></span></h4><div class="notion-text notion-block-3758d88bb05080748994d35fef211f58">只有PostgreSQL编译的时候带有zlib选项时才可以使用下来该选项的压缩算法</div><div class="notion-text notion-block-3758d88bb050802d8eadf502666e728c">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb0508082aa72efe4fabd4779" data-id="3758d88bb0508082aa72efe4fabd4779"><span><div id="3758d88bb0508082aa72efe4fabd4779" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb0508082aa72efe4fabd4779" title="unicode-mode"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">unicode-mode</span></span></h4><div class="notion-text notion-block-3758d88bb05080219310ca0a1577c635">Whether to convert textual data from database internal encoding to UTF-8 and back. If your database already is UTF-8, no conversion will be done, but the message will be tagged as UTF-8. Without this option it will not be.</div><div class="notion-text notion-block-3758d88bb05080489dbdff512f98b4b2">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080a78a00dcf61159368e" data-id="3758d88bb05080a78a00dcf61159368e"><span><div id="3758d88bb05080a78a00dcf61159368e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080a78a00dcf61159368e" title="compress-level"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">compress-level</span></span></h4><div class="notion-text notion-block-3758d88bb0508002b380d6de81654155">How much to compress. Higher levels compress smaller but are slower. 0 disables compression.</div><div class="notion-text notion-block-3758d88bb05080ec90ebd8803d552fb4">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080c3b107ec4da6f23941" data-id="3758d88bb05080c3b107ec4da6f23941"><span><div id="3758d88bb05080c3b107ec4da6f23941" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080c3b107ec4da6f23941" title="cipher-algo"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">cipher-algo</span></span></h4><div class="notion-text notion-block-3758d88bb0508074a723f52a81178377">Which cipher algorithm to use.</div><div class="notion-text notion-block-3758d88bb05080df965dc5dc6e6451b4">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080a39c90d948b2f003f1" data-id="3758d88bb05080a39c90d948b2f003f1"><span><div id="3758d88bb05080a39c90d948b2f003f1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080a39c90d948b2f003f1" title="convert-crlf"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">convert-crlf</span></span></h4><div class="notion-text notion-block-3758d88bb05080719b3dff004855c939">Whether to convert \n into \r\n when encrypting and \r\n to \n when decrypting. RFC 4880 specifies that text data should be stored using \r\n line-feeds. Use this to get fully RFC-compliant behavior.</div><div class="notion-text notion-block-3758d88bb050804ca68eeb7639e6cd53">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb050809f87c1d09e8d10ebd4" data-id="3758d88bb050809f87c1d09e8d10ebd4"><span><div id="3758d88bb050809f87c1d09e8d10ebd4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050809f87c1d09e8d10ebd4" title="disable-mdc"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">disable-mdc</span></span></h4><div class="notion-text notion-block-3758d88bb05080e18315f7e3507833c0">Do not protect data with SHA-1. The only good reason to use this option is to achieve compatibility with ancient PGP products, predating the addition of SHA-1 protected packets to RFC 4880. Recent <a class="notion-link" href="http://gnupg.org/" target="_blank" rel="noopener noreferrer">gnupg.org</a> and <a class="notion-link" href="http://pgp.com/" target="_blank" rel="noopener noreferrer">pgp.com</a> software supports it fine.</div><div class="notion-text notion-block-3758d88bb050807bb52ec94c4888ddea">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb050809aa71ce0a4e18f29b5" data-id="3758d88bb050809aa71ce0a4e18f29b5"><span><div id="3758d88bb050809aa71ce0a4e18f29b5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050809aa71ce0a4e18f29b5" title="s2k-mode"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">s2k-mode</span></span></h4><div class="notion-text notion-block-3758d88bb050802fb5c7c1949f9ce35e">Which S2K algorithm to use.</div><div class="notion-text notion-block-3758d88bb05080819519edb8b53eb2ee">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb050804d8b0cd15c21799dbb" data-id="3758d88bb050804d8b0cd15c21799dbb"><span><div id="3758d88bb050804d8b0cd15c21799dbb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050804d8b0cd15c21799dbb" title="s2k-digest-algo"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">s2k-digest-algo</span></span></h4><div class="notion-text notion-block-3758d88bb0508080ad8bfcca6d6457de">Which digest algorithm to use in S2K calculation.</div><div class="notion-text notion-block-3758d88bb05080c4a2b0f76ebf22bc95">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080be9a2cc3000989b8eb" data-id="3758d88bb05080be9a2cc3000989b8eb"><span><div id="3758d88bb05080be9a2cc3000989b8eb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080be9a2cc3000989b8eb" title="s2k-cipher-algo"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">s2k-cipher-algo</span></span></h4><div class="notion-text notion-block-3758d88bb05080229488f838db661c49">Which cipher to use for encrypting separate session key.</div><div class="notion-text notion-block-3758d88bb05080a78181dec0762d0459">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb050801dbd74e1c7d45648d6" data-id="3758d88bb050801dbd74e1c7d45648d6"><span><div id="3758d88bb050801dbd74e1c7d45648d6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb050801dbd74e1c7d45648d6" title="enable-session-key"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">enable-session-key</span></span></h4><div class="notion-text notion-block-3758d88bb05080c596c6c30a6b31cc06">Use separate session key. Public-key encryption always uses a separate session key; this is for symmetric-key encryption, which by default uses the S2K key directly.</div><div class="notion-text notion-block-3758d88bb05080f891a1d77e80ad9090">e.g.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3758d88bb05080aa9f8ff2e89d5d67cb" data-id="3758d88bb05080aa9f8ff2e89d5d67cb"><span><div id="3758d88bb05080aa9f8ff2e89d5d67cb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3758d88bb05080aa9f8ff2e89d5d67cb" title="PGP功能的选项的复合选项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">PGP功能的选项的复合选项</span></span></h4><div class="notion-blank notion-block-3758d88bb05080988e31d38462ca1893"> </div><div class="notion-blank notion-block-3758d88bb05080c69781f297d57b864f"> </div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>