diff options
| author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-10-01 15:56:26 +0300 | 
|---|---|---|
| committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-10-01 16:03:39 +0300 | 
| commit | 32984d8fc3dbb90a3fafb69fece0134f1ea790f9 (patch) | |
| tree | 8b18afd55fccc1887ae9872767b8958e9c7fb880 /doc/src | |
| parent | 0ef3c29a4b43e72d93cff65a17a9ccccff87618d (diff) | |
Add functions for dealing with PGP armor header lines to pgcrypto.
This add a new pgp_armor_headers function to extract armor headers from an
ASCII-armored blob, and a new overloaded variant of the armor function, for
constructing an ASCII-armor with extra headers.
Marko Tiikkaja and me.
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/pgcrypto.sgml | 28 | 
1 files changed, 27 insertions, 1 deletions
diff --git a/doc/src/sgml/pgcrypto.sgml b/doc/src/sgml/pgcrypto.sgml index 544a1f8346a..f0928f80fe2 100644 --- a/doc/src/sgml/pgcrypto.sgml +++ b/doc/src/sgml/pgcrypto.sgml @@ -691,13 +691,39 @@ pgp_key_id(bytea) returns text     </indexterm>  <synopsis> -armor(data bytea) returns text +armor(data bytea [ , keys text[], values text[] ]) returns text  dearmor(data text) returns bytea  </synopsis>     <para>      These functions wrap/unwrap binary data into PGP ASCII-armor format,      which is basically Base64 with CRC and additional formatting.     </para> + +   <para> +    If the <parameter>keys</> and <parameter>values</> arrays are specified, +    an <firstterm>armor header</> is added to the armored format for each +    key/value pair. Both arrays must be single-dimensional, and they must +    be of the same length.  The keys and values cannot contain any non-ASCII +    characters. +   </para> +  </sect3> + +  <sect3> +   <title><function>pgp_armor_headers</function></title> + +   <indexterm> +    <primary>pgp_armor_headers</primary> +   </indexterm> + +<synopsis> +pgp_armor_headers(data text, key out text, value out text) returns setof record +</synopsis> +   <para> +    <function>pgp_armor_headers()</> extracts the armor headers from +    <parameter>data</>.  The return value is a set of rows with two columns, +    key and value.  If the keys or values contain any non-ASCII characters, +    they are treated as UTF-8. +   </para>    </sect3>    <sect3>  | 
