diff --git a/ChangeLog b/ChangeLog index 5f74291..f271d19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -68,6 +68,10 @@ To fix this, the function now starts at position 1 to search. + Added API doc for libpcp, generated using doxygen + in man/html/. Latest API docs can be found on + http://www.daemon.de/libpcp/. + 0.2.0 ED25519 and Curve25519 keys are now generated separately (previously they were generated from one random seed, the curve had been derived from diff --git a/include/pcp.h b/include/pcp.h index 8b16eae..fb0d6c6 100644 --- a/include/pcp.h +++ b/include/pcp.h @@ -8,6 +8,7 @@ extern "C" { #include "pcp/config.h" #include "pcp/base85.h" #include "pcp/buffer.h" +#include "pcp/config.h" #include "pcp/crypto.h" #include "pcp/defines.h" #include "pcp/digital_crc32.h" diff --git a/man/Makefile.am b/man/Makefile.am index 088737d..4de2121 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -20,3 +20,12 @@ # dist_man_MANS = pcp1.1 DATAROOTDIR = /usr +DOXDIR = $(prefix)/share/doc/libpcp-$(VERSION) + +DOC_FILES = html/* ../README.txt ../COPYING ../AUTHORS ../INSTALL ../ChangeLog ../config.log + +# FIXME: make doc install optional... +install-data-local: + $(INSTALL) -m 755 -d $(DOXDIR) + $(INSTALL) -m 644 $(DOC_FILES) $(DOXDIR)/ + diff --git a/man/html/annotated.html b/man/html/annotated.html new file mode 100644 index 0000000..73cabe8 --- /dev/null +++ b/man/html/annotated.html @@ -0,0 +1,69 @@ + + +
+ + +|
+ libpcp
+ 0.2.1
+
+ |
+
| A flexible buffer object wich automatically resizes, if neccessary | |
| PCP private key structure | |
| PCP public key structure | |
| Encrypted recipient list | |
| An I/O wrapper object backed by a file or a buffer | |
| Defines the vault header | |
| An item header | |
| This structure represents a vault |
+ 1.8.2
+
+
+
diff --git a/man/html/bc_s.png b/man/html/bc_s.png
new file mode 100644
index 0000000..224b29a
Binary files /dev/null and b/man/html/bc_s.png differ
diff --git a/man/html/bdwn.png b/man/html/bdwn.png
new file mode 100644
index 0000000..940a0b9
Binary files /dev/null and b/man/html/bdwn.png differ
diff --git a/man/html/buffer_8h_source.html b/man/html/buffer_8h_source.html
new file mode 100644
index 0000000..bb2eb42
--- /dev/null
+++ b/man/html/buffer_8h_source.html
@@ -0,0 +1,191 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/classes.html b/man/html/classes.html
new file mode 100644
index 0000000..a5ed037
--- /dev/null
+++ b/man/html/classes.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
| _pcp_key_t | _pcp_rec_t | _vault_header_t | _vault_t | |
| _pcp_pubkey_t | _pcp_stream_t | _vault_item_header_t | |||
| _pcp_buffer | |||||
+ 1.8.2
+
+
+
diff --git a/man/html/closed.png b/man/html/closed.png
new file mode 100644
index 0000000..98cc2c9
Binary files /dev/null and b/man/html/closed.png differ
diff --git a/man/html/crypto_8h_source.html b/man/html/crypto_8h_source.html
new file mode 100644
index 0000000..3d327d2
--- /dev/null
+++ b/man/html/crypto_8h_source.html
@@ -0,0 +1,133 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/defines_8h_source.html b/man/html/defines_8h_source.html
new file mode 100644
index 0000000..1c267c9
--- /dev/null
+++ b/man/html/defines_8h_source.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/dir_76e3dfa7802a76391b3a5cc4012b4dd7.html b/man/html/dir_76e3dfa7802a76391b3a5cc4012b4dd7.html
new file mode 100644
index 0000000..6cb001c
--- /dev/null
+++ b/man/html/dir_76e3dfa7802a76391b3a5cc4012b4dd7.html
@@ -0,0 +1,99 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+Files | |
| file | buffer.h [code] |
| file | crypto.h [code] |
| file | defines.h [code] |
| file | ed.h [code] |
| file | getpass.h [code] |
| file | key.h [code] |
| file | keyhash.h [code] |
| file | keysig.h [code] |
| file | mac.h [code] |
| file | mem.h [code] |
| file | mgmt.h [code] |
| file | pad.h [code] |
| file | pcpstream.h [code] |
| file | plist.h [code] |
| file | randomart.h [code] |
| file | scrypt.h [code] |
| file | util.h [code] |
| file | vault.h [code] |
| file | version.h [code] |
| file | z85.h [code] |
+ 1.8.2
+
+
+
diff --git a/man/html/dir_d44c64559bbebec7f509842c48db8b23.html b/man/html/dir_d44c64559bbebec7f509842c48db8b23.html
new file mode 100644
index 0000000..ced4636
--- /dev/null
+++ b/man/html/dir_d44c64559bbebec7f509842c48db8b23.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+Directories | |
| directory | pcp |
+ 1.8.2
+
+
+
diff --git a/man/html/doxygen.css b/man/html/doxygen.css
new file mode 100644
index 0000000..2642e8f
--- /dev/null
+++ b/man/html/doxygen.css
@@ -0,0 +1,1172 @@
+/* The standard CSS for doxygen */
+
+body, table, div, p, dl {
+ font: 400 14px/19px Roboto,sans-serif;
+}
+
+/* @group Heading Levels */
+
+h1.groupheader {
+ font-size: 150%;
+}
+
+.title {
+ font-size: 150%;
+ font-weight: bold;
+ margin: 10px 2px;
+}
+
+h2.groupheader {
+ border-bottom: 1px solid #879ECB;
+ color: #354C7B;
+ font-size: 150%;
+ font-weight: normal;
+ margin-top: 1.75em;
+ padding-top: 8px;
+ padding-bottom: 4px;
+ width: 100%;
+}
+
+h3.groupheader {
+ font-size: 100%;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ -webkit-transition: text-shadow 0.5s linear;
+ -moz-transition: text-shadow 0.5s linear;
+ -ms-transition: text-shadow 0.5s linear;
+ -o-transition: text-shadow 0.5s linear;
+ transition: text-shadow 0.5s linear;
+ margin-right: 15px;
+}
+
+h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
+ text-shadow: 0 0 15px cyan;
+}
+
+dt {
+ font-weight: bold;
+}
+
+div.multicol {
+ -moz-column-gap: 1em;
+ -webkit-column-gap: 1em;
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+}
+
+p.startli, p.startdd, p.starttd {
+ margin-top: 2px;
+}
+
+p.endli {
+ margin-bottom: 0px;
+}
+
+p.enddd {
+ margin-bottom: 4px;
+}
+
+p.endtd {
+ margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+ font-weight: bold;
+}
+
+span.legend {
+ font-size: 70%;
+ text-align: center;
+}
+
+h3.version {
+ font-size: 90%;
+ text-align: center;
+}
+
+div.qindex, div.navtab{
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+}
+
+div.qindex, div.navpath {
+ width: 100%;
+ line-height: 140%;
+}
+
+div.navtab {
+ margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+ color: #3D578C;
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.contents a:visited {
+ color: #4665A2;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a.qindex {
+ font-weight: bold;
+}
+
+a.qindexHL {
+ font-weight: bold;
+ background-color: #9CAFD4;
+ color: #ffffff;
+ border: 1px double #869DCA;
+}
+
+.contents a.qindexHL:visited {
+ color: #ffffff;
+}
+
+a.el {
+ font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code, a.code:visited {
+ color: #4665A2;
+}
+
+a.codeRef, a.codeRef:visited {
+ color: #4665A2;
+}
+
+/* @end */
+
+dl.el {
+ margin-left: -1cm;
+}
+
+pre.fragment {
+ border: 1px solid #C4CFE5;
+ background-color: #FBFCFD;
+ padding: 4px 6px;
+ margin: 4px 8px 4px 2px;
+ overflow: auto;
+ word-wrap: break-word;
+ font-size: 9pt;
+ line-height: 125%;
+ font-family: monospace, fixed;
+ font-size: 105%;
+}
+
+div.fragment {
+ padding: 4px;
+ margin: 4px;
+ background-color: #FBFCFD;
+ border: 1px solid #C4CFE5;
+}
+
+div.line {
+ font-family: monospace, fixed;
+ font-size: 13px;
+ min-height: 13px;
+ line-height: 1.0;
+ text-wrap: unrestricted;
+ white-space: -moz-pre-wrap; /* Moz */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ white-space: pre-wrap; /* CSS3 */
+ word-wrap: break-word; /* IE 5.5+ */
+ text-indent: -53px;
+ padding-left: 53px;
+ padding-bottom: 0px;
+ margin: 0px;
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
+}
+
+div.line.glow {
+ background-color: cyan;
+ box-shadow: 0 0 10px cyan;
+}
+
+
+span.lineno {
+ padding-right: 4px;
+ text-align: right;
+ border-right: 2px solid #0F0;
+ background-color: #E8E8E8;
+ white-space: pre;
+}
+span.lineno a {
+ background-color: #D8D8D8;
+}
+
+span.lineno a:hover {
+ background-color: #C8C8C8;
+}
+
+div.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px;
+ padding: 0.2em;
+ border: solid thin #333;
+ border-radius: 0.5em;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ box-shadow: 2px 2px 3px #999;
+ -webkit-box-shadow: 2px 2px 3px #999;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+ background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
+}
+
+div.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ font-weight: bold;
+}
+
+div.groupText {
+ margin-left: 16px;
+ font-style: italic;
+}
+
+body {
+ background-color: white;
+ color: black;
+ margin: 0;
+}
+
+div.contents {
+ margin-top: 10px;
+ margin-left: 12px;
+ margin-right: 8px;
+}
+
+td.indexkey {
+ background-color: #EBEFF6;
+ font-weight: bold;
+ border: 1px solid #C4CFE5;
+ margin: 2px 0px 2px 0;
+ padding: 2px 10px;
+ white-space: nowrap;
+ vertical-align: top;
+}
+
+td.indexvalue {
+ background-color: #EBEFF6;
+ border: 1px solid #C4CFE5;
+ padding: 2px 10px;
+ margin: 2px 0px;
+}
+
+tr.memlist {
+ background-color: #EEF1F7;
+}
+
+p.formulaDsp {
+ text-align: center;
+}
+
+img.formulaDsp {
+
+}
+
+img.formulaInl {
+ vertical-align: middle;
+}
+
+div.center {
+ text-align: center;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+div.center img {
+ border: 0px;
+}
+
+address.footer {
+ text-align: right;
+ padding-right: 12px;
+}
+
+img.footer {
+ border: 0px;
+ vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+ color: #008000
+}
+
+span.keywordtype {
+ color: #604020
+}
+
+span.keywordflow {
+ color: #e08000
+}
+
+span.comment {
+ color: #800000
+}
+
+span.preprocessor {
+ color: #806020
+}
+
+span.stringliteral {
+ color: #002080
+}
+
+span.charliteral {
+ color: #008080
+}
+
+span.vhdldigit {
+ color: #ff00ff
+}
+
+span.vhdlchar {
+ color: #000000
+}
+
+span.vhdlkeyword {
+ color: #700070
+}
+
+span.vhdllogic {
+ color: #ff0000
+}
+
+blockquote {
+ background-color: #F7F8FB;
+ border-left: 2px solid #9CAFD4;
+ margin: 0 24px 0 4px;
+ padding: 0 12px 0 16px;
+}
+
+/* @end */
+
+/*
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+
+form.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+
+input.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+ font-size: 75%;
+}
+
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #A3B4D7;
+}
+
+th.dirtab {
+ background: #EBEFF6;
+ font-weight: bold;
+}
+
+hr {
+ height: 0px;
+ border: none;
+ border-top: 1px solid #4A6AAA;
+}
+
+hr.footer {
+ height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+ border-spacing: 0px;
+ padding: 0px;
+}
+
+.memberdecls td, .fieldtable tr {
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
+}
+
+.memberdecls td.glow, .fieldtable tr.glow {
+ background-color: cyan;
+ box-shadow: 0 0 15px cyan;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #F9FAFC;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memSeparator {
+ border-bottom: 1px solid #DEE4F0;
+ line-height: 1px;
+ margin: 0px;
+ padding: 0px;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memItemRight {
+ width: 100%;
+}
+
+.memTemplParams {
+ color: #4665A2;
+ white-space: nowrap;
+ font-size: 80%;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #4665A2;
+ font-weight: normal;
+ margin-left: 9px;
+}
+
+.memnav {
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.mempage {
+ width: 100%;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+ margin-right: 5px;
+ -webkit-transition: box-shadow 0.5s linear;
+ -moz-transition: box-shadow 0.5s linear;
+ -ms-transition: box-shadow 0.5s linear;
+ -o-transition: box-shadow 0.5s linear;
+ transition: box-shadow 0.5s linear;
+ display: table !important;
+ width: 100%;
+}
+
+.memitem.glow {
+ box-shadow: 0 0 15px cyan;
+}
+
+.memname {
+ font-weight: bold;
+ margin-left: 6px;
+}
+
+.memname td {
+ vertical-align: bottom;
+}
+
+.memproto, dl.reflist dt {
+ border-top: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 6px 0px 6px 0px;
+ color: #253555;
+ font-weight: bold;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ background-image:url('nav_f.png');
+ background-repeat:repeat-x;
+ background-color: #E2E8F2;
+ /* opera specific markup */
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ /* firefox specific markup */
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ -moz-border-radius-topright: 4px;
+ -moz-border-radius-topleft: 4px;
+ /* webkit specific markup */
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -webkit-border-top-right-radius: 4px;
+ -webkit-border-top-left-radius: 4px;
+
+}
+
+.memdoc, dl.reflist dd {
+ border-bottom: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 6px 10px 2px 10px;
+ background-color: #FBFCFD;
+ border-top-width: 0;
+ background-image:url('nav_g.png');
+ background-repeat:repeat-x;
+ background-color: #FFFFFF;
+ /* opera specific markup */
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ /* firefox specific markup */
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ /* webkit specific markup */
+ -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+dl.reflist dt {
+ padding: 5px;
+}
+
+dl.reflist dd {
+ margin: 0px 0px 10px 0px;
+ padding: 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+.paramname code {
+ line-height: 14px;
+}
+
+.params, .retval, .exception, .tparams {
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+.params .paramname, .retval .paramname {
+ font-weight: bold;
+ vertical-align: top;
+}
+
+.params .paramtype {
+ font-style: italic;
+ vertical-align: top;
+}
+
+.params .paramdir {
+ font-family: "courier new",courier,monospace;
+ vertical-align: top;
+}
+
+table.mlabels {
+ border-spacing: 0px;
+}
+
+td.mlabels-left {
+ width: 100%;
+ padding: 0px;
+}
+
+td.mlabels-right {
+ vertical-align: bottom;
+ padding: 0px;
+ white-space: nowrap;
+}
+
+span.mlabels {
+ margin-left: 8px;
+}
+
+span.mlabel {
+ background-color: #728DC1;
+ border-top:1px solid #5373B4;
+ border-left:1px solid #5373B4;
+ border-right:1px solid #C4CFE5;
+ border-bottom:1px solid #C4CFE5;
+ text-shadow: none;
+ color: white;
+ margin-right: 4px;
+ padding: 2px 3px;
+ border-radius: 3px;
+ font-size: 7pt;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+
+
+
+/* @end */
+
+/* these are for tree view when not used as main index */
+
+div.directory {
+ margin: 10px 0px;
+ border-top: 1px solid #A8B8D9;
+ border-bottom: 1px solid #A8B8D9;
+ width: 100%;
+}
+
+.directory table {
+ border-collapse:collapse;
+}
+
+.directory td {
+ margin: 0px;
+ padding: 0px;
+ vertical-align: top;
+}
+
+.directory td.entry {
+ white-space: nowrap;
+ padding-right: 6px;
+}
+
+.directory td.entry a {
+ outline:none;
+}
+
+.directory td.entry a img {
+ border: none;
+}
+
+.directory td.desc {
+ width: 100%;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 3px;
+ border-left: 1px solid rgba(0,0,0,0.05);
+}
+
+.directory tr.even {
+ padding-left: 6px;
+ background-color: #F7F8FB;
+}
+
+.directory img {
+ vertical-align: -30%;
+}
+
+.directory .levels {
+ white-space: nowrap;
+ width: 100%;
+ text-align: right;
+ font-size: 9pt;
+}
+
+.directory .levels span {
+ cursor: pointer;
+ padding-left: 2px;
+ padding-right: 2px;
+ color: #3D578C;
+}
+
+div.dynheader {
+ margin-top: 8px;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+address {
+ font-style: normal;
+ color: #2A3D61;
+}
+
+table.doxtable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.doxtable td, table.doxtable th {
+ border: 1px solid #2D4068;
+ padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+ background-color: #374F7F;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+table.fieldtable {
+ width: 100%;
+ margin-bottom: 10px;
+ border: 1px solid #A8B8D9;
+ border-spacing: 0px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+ box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+}
+
+.fieldtable td, .fieldtable th {
+ padding: 3px 7px 2px;
+}
+
+.fieldtable td.fieldtype, .fieldtable td.fieldname {
+ white-space: nowrap;
+ border-right: 1px solid #A8B8D9;
+ border-bottom: 1px solid #A8B8D9;
+ vertical-align: top;
+}
+
+.fieldtable td.fielddoc {
+ border-bottom: 1px solid #A8B8D9;
+ width: 100%;
+}
+
+.fieldtable tr:last-child td {
+ border-bottom: none;
+}
+
+.fieldtable th {
+ background-image:url('nav_f.png');
+ background-repeat:repeat-x;
+ background-color: #E2E8F2;
+ font-size: 90%;
+ color: #253555;
+ padding-bottom: 4px;
+ padding-top: 5px;
+ text-align:left;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom: 1px solid #A8B8D9;
+}
+
+
+.tabsearch {
+ top: 0px;
+ left: 10px;
+ height: 36px;
+ background-image: url('tab_b.png');
+ z-index: 101;
+ overflow: hidden;
+ font-size: 13px;
+}
+
+.navpath ul
+{
+ font-size: 11px;
+ background-image:url('tab_b.png');
+ background-repeat:repeat-x;
+ background-position: 0 -5px;
+ height:30px;
+ line-height:30px;
+ color:#8AA0CC;
+ border:solid 1px #C2CDE4;
+ overflow:hidden;
+ margin:0px;
+ padding:0px;
+}
+
+.navpath li
+{
+ list-style-type:none;
+ float:left;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:url('bc_s.png');
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+}
+
+.navpath li.navelem a
+{
+ height:32px;
+ display:block;
+ text-decoration: none;
+ outline: none;
+ color: #283A5D;
+ font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ text-decoration: none;
+}
+
+.navpath li.navelem a:hover
+{
+ color:#6884BD;
+}
+
+.navpath li.footer
+{
+ list-style-type:none;
+ float:right;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:none;
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+ font-size: 8pt;
+}
+
+
+div.summary
+{
+ float: right;
+ font-size: 8pt;
+ padding-right: 5px;
+ width: 50%;
+ text-align: right;
+}
+
+div.summary a
+{
+ white-space: nowrap;
+}
+
+div.ingroups
+{
+ font-size: 8pt;
+ width: 50%;
+ text-align: left;
+}
+
+div.ingroups a
+{
+ white-space: nowrap;
+}
+
+div.header
+{
+ background-image:url('nav_h.png');
+ background-repeat:repeat-x;
+ background-color: #F9FAFC;
+ margin: 0px;
+ border-bottom: 1px solid #C4CFE5;
+}
+
+div.headertitle
+{
+ padding: 5px 5px 5px 10px;
+}
+
+dl
+{
+ padding: 0 0 0 10px;
+}
+
+/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
+dl.section
+{
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+dl.note
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #D0C000;
+}
+
+dl.warning, dl.attention
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #FF0000;
+}
+
+dl.pre, dl.post, dl.invariant
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #00D000;
+}
+
+dl.deprecated
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #505050;
+}
+
+dl.todo
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #00C0E0;
+}
+
+dl.test
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #3030E0;
+}
+
+dl.bug
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #C08050;
+}
+
+dl.section dd {
+ margin-bottom: 6px;
+}
+
+
+#projectlogo
+{
+ text-align: center;
+ vertical-align: bottom;
+ border-collapse: separate;
+}
+
+#projectlogo img
+{
+ border: 0px none;
+}
+
+#projectname
+{
+ font: 300% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 2px 0px;
+}
+
+#projectbrief
+{
+ font: 120% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#projectnumber
+{
+ font: 50% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#titlearea
+{
+ padding: 0px;
+ margin: 0px;
+ width: 100%;
+ border-bottom: 1px solid #5373B4;
+}
+
+.image
+{
+ text-align: center;
+}
+
+.dotgraph
+{
+ text-align: center;
+}
+
+.mscgraph
+{
+ text-align: center;
+}
+
+.caption
+{
+ font-weight: bold;
+}
+
+div.zoom
+{
+ border: 1px solid #90A5CE;
+}
+
+dl.citelist {
+ margin-bottom:50px;
+}
+
+dl.citelist dt {
+ color:#334975;
+ float:left;
+ font-weight:bold;
+ margin-right:10px;
+ padding:5px;
+}
+
+dl.citelist dd {
+ margin:2px 0;
+ padding:5px 0;
+}
+
+div.toc {
+ padding: 14px 25px;
+ background-color: #F4F6FA;
+ border: 1px solid #D8DFEE;
+ border-radius: 7px 7px 7px 7px;
+ float: right;
+ height: auto;
+ margin: 0 20px 10px 10px;
+ width: 200px;
+}
+
+div.toc li {
+ background: url("bdwn.png") no-repeat scroll 0 5px transparent;
+ font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
+ margin-top: 5px;
+ padding-left: 10px;
+ padding-top: 2px;
+}
+
+div.toc h3 {
+ font: bold 12px/1.2 Arial,FreeSans,sans-serif;
+ color: #4665A2;
+ border-bottom: 0 none;
+ margin: 0;
+}
+
+div.toc ul {
+ list-style: none outside none;
+ border: medium none;
+ padding: 0px;
+}
+
+div.toc li.level1 {
+ margin-left: 0px;
+}
+
+div.toc li.level2 {
+ margin-left: 15px;
+}
+
+div.toc li.level3 {
+ margin-left: 30px;
+}
+
+div.toc li.level4 {
+ margin-left: 45px;
+}
+
+.inherit_header {
+ font-weight: bold;
+ color: gray;
+ cursor: pointer;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.inherit_header td {
+ padding: 6px 0px 2px 5px;
+}
+
+.inherit {
+ display: none;
+}
+
+tr.heading h2 {
+ margin-top: 12px;
+ margin-bottom: 4px;
+}
+
+@media print
+{
+ #top { display: none; }
+ #side-nav { display: none; }
+ #nav-path { display: none; }
+ body { overflow:visible; }
+ h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
+ .summary { display: none; }
+ .memitem { page-break-inside: avoid; }
+ #doc-content
+ {
+ margin-left:0 !important;
+ height:auto !important;
+ width:auto !important;
+ overflow:inherit;
+ display:inline;
+ }
+}
+
diff --git a/man/html/doxygen.png b/man/html/doxygen.png
new file mode 100644
index 0000000..3ff17d8
Binary files /dev/null and b/man/html/doxygen.png differ
diff --git a/man/html/dynsections.js b/man/html/dynsections.js
new file mode 100644
index 0000000..116542f
--- /dev/null
+++ b/man/html/dynsections.js
@@ -0,0 +1,78 @@
+function toggleVisibility(linkObj)
+{
+ var base = $(linkObj).attr('id');
+ var summary = $('#'+base+'-summary');
+ var content = $('#'+base+'-content');
+ var trigger = $('#'+base+'-trigger');
+ var src=$(trigger).attr('src');
+ if (content.is(':visible')===true) {
+ content.hide();
+ summary.show();
+ $(linkObj).addClass('closed').removeClass('opened');
+ $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
+ } else {
+ content.show();
+ summary.hide();
+ $(linkObj).removeClass('closed').addClass('opened');
+ $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
+ }
+ return false;
+}
+
+function updateStripes()
+{
+ $('table.directory tr').
+ removeClass('even').filter(':visible:even').addClass('even');
+}
+function toggleLevel(level)
+{
+ $('table.directory tr').each(function(){
+ var l = this.id.split('_').length-1;
+ var i = $('#img'+this.id.substring(3));
+ var a = $('#arr'+this.id.substring(3));
+ if (l|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/files.html b/man/html/files.html
new file mode 100644
index 0000000..cf92552
--- /dev/null
+++ b/man/html/files.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/ftv2blank.png b/man/html/ftv2blank.png
new file mode 100644
index 0000000..63c605b
Binary files /dev/null and b/man/html/ftv2blank.png differ
diff --git a/man/html/ftv2cl.png b/man/html/ftv2cl.png
new file mode 100644
index 0000000..132f657
Binary files /dev/null and b/man/html/ftv2cl.png differ
diff --git a/man/html/ftv2doc.png b/man/html/ftv2doc.png
new file mode 100644
index 0000000..17edabf
Binary files /dev/null and b/man/html/ftv2doc.png differ
diff --git a/man/html/ftv2folderclosed.png b/man/html/ftv2folderclosed.png
new file mode 100644
index 0000000..bb8ab35
Binary files /dev/null and b/man/html/ftv2folderclosed.png differ
diff --git a/man/html/ftv2folderopen.png b/man/html/ftv2folderopen.png
new file mode 100644
index 0000000..d6c7f67
Binary files /dev/null and b/man/html/ftv2folderopen.png differ
diff --git a/man/html/ftv2lastnode.png b/man/html/ftv2lastnode.png
new file mode 100644
index 0000000..63c605b
Binary files /dev/null and b/man/html/ftv2lastnode.png differ
diff --git a/man/html/ftv2link.png b/man/html/ftv2link.png
new file mode 100644
index 0000000..17edabf
Binary files /dev/null and b/man/html/ftv2link.png differ
diff --git a/man/html/ftv2mlastnode.png b/man/html/ftv2mlastnode.png
new file mode 100644
index 0000000..0b63f6d
Binary files /dev/null and b/man/html/ftv2mlastnode.png differ
diff --git a/man/html/ftv2mnode.png b/man/html/ftv2mnode.png
new file mode 100644
index 0000000..0b63f6d
Binary files /dev/null and b/man/html/ftv2mnode.png differ
diff --git a/man/html/ftv2mo.png b/man/html/ftv2mo.png
new file mode 100644
index 0000000..4bfb80f
Binary files /dev/null and b/man/html/ftv2mo.png differ
diff --git a/man/html/ftv2node.png b/man/html/ftv2node.png
new file mode 100644
index 0000000..63c605b
Binary files /dev/null and b/man/html/ftv2node.png differ
diff --git a/man/html/ftv2ns.png b/man/html/ftv2ns.png
new file mode 100644
index 0000000..72e3d71
Binary files /dev/null and b/man/html/ftv2ns.png differ
diff --git a/man/html/ftv2plastnode.png b/man/html/ftv2plastnode.png
new file mode 100644
index 0000000..c6ee22f
Binary files /dev/null and b/man/html/ftv2plastnode.png differ
diff --git a/man/html/ftv2pnode.png b/man/html/ftv2pnode.png
new file mode 100644
index 0000000..c6ee22f
Binary files /dev/null and b/man/html/ftv2pnode.png differ
diff --git a/man/html/ftv2splitbar.png b/man/html/ftv2splitbar.png
new file mode 100644
index 0000000..fe895f2
Binary files /dev/null and b/man/html/ftv2splitbar.png differ
diff --git a/man/html/ftv2vertline.png b/man/html/ftv2vertline.png
new file mode 100644
index 0000000..63c605b
Binary files /dev/null and b/man/html/ftv2vertline.png differ
diff --git a/man/html/functions.html b/man/html/functions.html
new file mode 100644
index 0000000..a76cba9
--- /dev/null
+++ b/man/html/functions.html
@@ -0,0 +1,274 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/functions_vars.html b/man/html/functions_vars.html
new file mode 100644
index 0000000..fccece4
--- /dev/null
+++ b/man/html/functions_vars.html
@@ -0,0 +1,274 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/getpass_8h_source.html b/man/html/getpass_8h_source.html
new file mode 100644
index 0000000..a809f75
--- /dev/null
+++ b/man/html/getpass_8h_source.html
@@ -0,0 +1,82 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/group__Buffer.html b/man/html/group__Buffer.html
new file mode 100644
index 0000000..d5cdade
--- /dev/null
+++ b/man/html/group__Buffer.html
@@ -0,0 +1,1526 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
Flexible buffer management, idea from openssh/buffer.c. +More...
++Classes | |
| struct | _pcp_buffer |
| A flexible buffer object wich automatically resizes, if neccessary. More... | |
+Typedefs | |
| typedef struct _pcp_buffer | Buffer |
| The name used everywhere. | |
+Functions | |
| Buffer * | buffer_new (size_t blocksize, char *name) |
| Create a new buffer. | |
| Buffer * | buffer_new_str (char *name) |
| Create a new string buffer. | |
| Buffer * | buffer_new_buf (char *name, void *data, size_t datasize) |
| Create a new buffer from existing data. | |
| void | buffer_free (Buffer *b) |
| Clears and frees the Buffer. | |
| void | buffer_clear (Buffer *b) |
| Clears the Buffer. | |
| void | buffer_rewind (Buffer *b) |
| Put read offset back to start. | |
| void | buffer_add (Buffer *b, const void *data, size_t len) |
| Add data to the buffer. | |
| void | buffer_add_buf (Buffer *dst, Buffer *src) |
| Add data to the buffer. | |
| void | buffer_add_str (Buffer *b, const char *fmt,...) |
| Add a formated string to the buffer. | |
| void | buffer_add_hex (Buffer *b, void *data, size_t len) |
| Add data as hex string to the buffer. | |
| int | buffer_done (Buffer *b) |
| Tell if there are no more bytes to read. | |
| size_t | buffer_get_chunk (Buffer *b, void *buf, size_t len) |
| Read some chunk of data from the Buffer. | |
| unsigned char * | buffer_get (Buffer *b) |
| Read the whole Buffer content. | |
| char * | buffer_get_str (Buffer *b) |
| Read the whole Buffer content as string. | |
| unsigned char * | buffer_get_remainder (Buffer *b) |
| Read the remaining data after current read offset. | |
| size_t | buffer_extract (Buffer *b, void *buf, size_t offset, size_t len) |
| Read some data inside the Buffer. | |
| void | buffer_dump (const Buffer *b) |
| Dump the Buffer contents to stderr in hex form. | |
| void | buffer_info (const Buffer *b) |
| Print Buffer counters to stderr. | |
| size_t | buffer_size (const Buffer *b) |
| Tell how much data there is in the buffer available. | |
| size_t | buffer_left (const Buffer *b) |
| Tell how much data is left to read in the Buffer. | |
| uint8_t | buffer_get8 (Buffer *b) |
| Read 1 byte (8 bit) number from a Buffer. | |
| uint16_t | buffer_get16 (Buffer *b) |
| Read 2 bytes (16 bit) number from a Buffer. | |
| uint32_t | buffer_get32 (Buffer *b) |
| Read 4 byte (32 bit) number from a Buffer. | |
| uint64_t | buffer_get64 (Buffer *b) |
| Read 8 byte (64 bit) from a Buffer. | |
| uint16_t | buffer_get16na (Buffer *b) |
| Read 2 bytes (16 bit) number from a Buffer, converted to host endian. | |
| uint32_t | buffer_get32na (Buffer *b) |
| Read 4 byte (32 bit) number from a Buffer, converted to host endian. | |
| uint64_t | buffer_get64na (Buffer *b) |
| Read 8 byte (64 bit) from a Buffer, converted to host endian. | |
| uint8_t | buffer_last8 (Buffer *b) |
| Read the last 1 byte (8 bit) number from a Buffer. | |
| uint16_t | buffer_last16 (Buffer *b) |
| Read the last 2 byte (16 bit) number from a Buffer. | |
| uint32_t | buffer_last32 (Buffer *b) |
| Read the last 4 byte (32 bit) number from a Buffer. | |
| uint64_t | buffer_last64 (Buffer *b) |
| Read the last 8 byte (64 bit) number from a Buffer. | |
| size_t | buffer_fd_read (Buffer *b, FILE *in, size_t len) |
| Read data from a file directly into a Buffer. | |
| void | buffer_add8 (Buffer *b, uint8_t v) |
| Write a 1 byte (8 bit) number in binary form into the buffer. | |
| void | buffer_add16 (Buffer *b, uint16_t v) |
| Write a 2 byte (16 bit) number in binary form into the buffer. | |
| void | buffer_add32 (Buffer *b, uint32_t v) |
| Write a 4 byte (32 bit) number in binary form into the buffer. | |
| void | buffer_add64 (Buffer *b, uint64_t v) |
| Write a 8 byte (64 bit) number in binary form into the buffer. | |
| void | buffer_add16be (Buffer *b, uint16_t v) |
| Write a 2 byte (16 bit) number in binary form into the buffer, converted to big endian. | |
| void | buffer_add32be (Buffer *b, uint32_t v) |
| Write a 4 byte (32 bit) number in binary form into the buffer, converted to big endian. | |
| void | buffer_add64be (Buffer *b, uint64_t v) |
| Write a 8 byte (64 bit) number in binary form into the buffer, converted to big endian. | |
Flexible buffer management, idea from openssh/buffer.c.
+This class allows us to dissect buffers into parts at will whithout the hassle of boundary checking in each and every line. Therefore it is more secure, since this system wraps all this stuff from us, so in case we're attemt to overflow a buffer or the like, the buffer functions will catch this, warn us and die.
+| typedef struct _pcp_buffer Buffer | +
| void buffer_add | +( | +Buffer * | +b, | +
| + | + | const void * | +data, | +
| + | + | size_t | +len | +
| + | ) | ++ |
Add data to the buffer.
+Adds data of the size len to the buffer and resizes the buffer, if neccessary. The write position ('end' field) will be updated accordingly.
+Data will be copied, you can free() the given pointer after copying..
+| [in] | b | The Buffer object. |
| [out] | data | Arbitrary data to add to the Buffer. |
| [in] | len | The size of the data to add in Bytes. |
| void buffer_add16 | +( | +Buffer * | +b, | +
| + | + | uint16_t | +v | +
| + | ) | ++ |
Write a 2 byte (16 bit) number in binary form into the buffer.
+| [out] | b | The Buffer object to write to. |
| [in] | v | The uint16_t to write to the buffer. |
| void buffer_add16be | +( | +Buffer * | +b, | +
| + | + | uint16_t | +v | +
| + | ) | ++ |
Write a 2 byte (16 bit) number in binary form into the buffer, converted to big endian.
+| [out] | b | The Buffer object to write to. |
| [in] | v | The uint16_t to write to the buffer. |
| void buffer_add32 | +( | +Buffer * | +b, | +
| + | + | uint32_t | +v | +
| + | ) | ++ |
Write a 4 byte (32 bit) number in binary form into the buffer.
+| [out] | b | The Buffer object to write to. |
| [in] | v | The uint32_t to write to the buffer. |
| void buffer_add32be | +( | +Buffer * | +b, | +
| + | + | uint32_t | +v | +
| + | ) | ++ |
Write a 4 byte (32 bit) number in binary form into the buffer, converted to big endian.
+| [out] | b | The Buffer object to write to. |
| [in] | v | The uint32_t to write to the buffer. |
| void buffer_add64 | +( | +Buffer * | +b, | +
| + | + | uint64_t | +v | +
| + | ) | ++ |
Write a 8 byte (64 bit) number in binary form into the buffer.
+| [out] | b | The Buffer object to write to. |
| [in] | v | The uint64_t to write to the buffer. |
| void buffer_add64be | +( | +Buffer * | +b, | +
| + | + | uint64_t | +v | +
| + | ) | ++ |
Write a 8 byte (64 bit) number in binary form into the buffer, converted to big endian.
+| [out] | b | The Buffer object to write to. |
| [in] | v | The uint64_t to write to the buffer. |
| void buffer_add8 | +( | +Buffer * | +b, | +
| + | + | uint8_t | +v | +
| + | ) | ++ |
Write a 1 byte (8 bit) number in binary form into the buffer.
+| [out] | b | The Buffer object to write to. |
| [in] | v | The uint8_t to write to the buffer. |
Add data to the buffer.
+Adds data from the given Buffer src to the buffer and resizes the buffer, if neccessary. The write position ('end' field) will be updated accordingly.
+Data will be copied, you can buffer_free() the given src Buffer after the copying.
+| [out] | dst | The destination Buffer object to copy data into. |
| [in] | src | The source Buffer object to copy data from. |
| void buffer_add_hex | +( | +Buffer * | +b, | +
| + | + | void * | +data, | +
| + | + | size_t | +len | +
| + | ) | ++ |
Add data as hex string to the buffer.
+Adds data of the size len to the buffer and resizes the buffer, if neccessary. The write position ('end' field) will be updated accordingly. Each byte will be put in its HEX form into the buffer (%02x).
+Data will be copied, you can free() the given pointer after copying..
+| [in] | b | The Buffer object. |
| [in] | data | Arbitrary data to add as hex into the Buffer. |
| [in] | len | The size of the data to add in Bytes. |
| void buffer_add_str | +( | +Buffer * | +b, | +
| + | + | const char * | +fmt, | +
| + | + | + | ... | +
| + | ) | ++ |
Add a formated string to the buffer.
+Use printf() like syntax to add a formatted string to the buffer. Refer to the documentation of printf() for details.
+Data will be copied, you can free() the given format string and params after copying.
+Example:
+| [in] | b | The Buffer object. |
| [in] | fmt | The printf() compatible format description. |
| [in] | ... | A variable number of arguments for the format string. |
| void buffer_clear | +( | +Buffer * | +b | ) | ++ |
Clears the Buffer.
+This clears the buffer by filling it with zeroes and resetting all counters. Memory will not be free'd. Called from buffer_free() before free'ing memory.
+| [in] | b | The Buffer object. |
| int buffer_done | +( | +Buffer * | +b | ) | ++ |
Tell if there are no more bytes to read.
+This functions tells if the EOF of the buffer is reached during read operations (no more data to read left).
+| [in] | b | The Buffer object. |
| void buffer_dump | +( | +const Buffer * | +b | ) | ++ |
Dump the Buffer contents to stderr in hex form.
+| [in] | b | The Buffer object to dump. |
| size_t buffer_extract | +( | +Buffer * | +b, | +
| + | + | void * | +buf, | +
| + | + | size_t | +offset, | +
| + | + | size_t | +len | +
| + | ) | ++ |
Read some data inside the Buffer.
+Same as buffer_get() but fetch some data chunk from somewhere in the middle of the buffer.
+The returned pointer has to be allocated by the caller to at least a size of len bytes.
+The read offset will be left untouched by this function.
+Example: suppose you've got a buffer with the following content:
+Then:
+| [in] | b | The Buffer object to read from. |
| [out] | buf | The buffer to copy data to. |
| [in] | offset | Where to start copying. |
| [in] | len | How mush data to copy. |
| size_t buffer_fd_read | +( | +Buffer * | +b, | +
| + | + | FILE * | +in, | +
| + | + | size_t | +len | +
| + | ) | ++ |
Read data from a file directly into a Buffer.
+This function reads in len bytes from the FILE stream 'in' into the Buffer. The file must already be opened by the caller.
+| [in,out] | b | The Buffer object to read from. |
| [in] | in | The FILE stream to read from. |
| [in] | len | The number of bytes to read. |
| void buffer_free | +( | +Buffer * | +b | ) | ++ |
Clears and frees the Buffer.
+This clears the buffer by filling it with zeroes and frees any allocated memory, including the Buffer object itself. Use this function instead of directly calling free(Buffer).
+| [in] | b | The Buffer object. |
| unsigned char* buffer_get | +( | +Buffer * | +b | ) | ++ |
Read the whole Buffer content.
+This function returns the whole buffer contents as a pointer to the internal data member (Buffer->buf). The returned pointer is allocated and filled with data up to buffer_size(Buffer), however, the allocated memory might be more than size, in fact it will be a multitude of Buffer-blocksize.
+Don't free() the pointer directly, use buffer_free() always.
+| [in] | b | The Buffer object to read from. |
| uint16_t buffer_get16 | +( | +Buffer * | +b | ) | ++ |
Read 2 bytes (16 bit) number from a Buffer.
+| [in] | b | The Buffer object to read from. |
| uint16_t buffer_get16na | +( | +Buffer * | +b | ) | ++ |
Read 2 bytes (16 bit) number from a Buffer, converted to host endian.
+| [in] | b | The Buffer object to read from. |
| uint32_t buffer_get32 | +( | +Buffer * | +b | ) | ++ |
Read 4 byte (32 bit) number from a Buffer.
+| [in] | b | The Buffer object to read from. |
| uint32_t buffer_get32na | +( | +Buffer * | +b | ) | ++ |
Read 4 byte (32 bit) number from a Buffer, converted to host endian.
+| [in] | b | The Buffer object to read from. |
| uint64_t buffer_get64 | +( | +Buffer * | +b | ) | ++ |
Read 8 byte (64 bit) from a Buffer.
+| [in] | b | The Buffer object to read from. |
| uint64_t buffer_get64na | +( | +Buffer * | +b | ) | ++ |
Read 8 byte (64 bit) from a Buffer, converted to host endian.
+| [in] | b | The Buffer object to read from. |
| uint8_t buffer_get8 | +( | +Buffer * | +b | ) | ++ |
Read 1 byte (8 bit) number from a Buffer.
+| [in] | b | The Buffer object to read from. |
| size_t buffer_get_chunk | +( | +Buffer * | +b, | +
| + | + | void * | +buf, | +
| + | + | size_t | +len | +
| + | ) | ++ |
Read some chunk of data from the Buffer.
+Read some chunk of data from the Buffer, starting from current read +offset til len. + +Example: suppose you've got a buffer with the following content: + +@code +AAAABBBBCCCC +@endcode + +Then the following code would: + +@code +unsigned char g[4]; +buffer_get_chunk(b, g, 4); // => g now contains 'AAAA' +buffer_get_chunk(b, g, 4); // => g now contains 'BBBB' +buffer_get_chunk(b, g, 4); // => g now contains 'CCCC' +@endcode + +In order to catch buffer overflow, check the return value, which will +be 0 in case of errors. See also: fatals_ifany(), buffer_done() and buffer_left(). + +\param[in] b The Buffer object to read from. + +\param[out] buf The destination pointer where the data will be copied to. This pointer +
must be allocated by the caller properly and it must have at least a size of len.
+\param[in] len The number of bytes to read from the Buffer.+
| unsigned char* buffer_get_remainder | +( | +Buffer * | +b | ) | ++ |
Read the remaining data after current read offset.
+Fetch whatever is left in the buffer. This works like buffer_get() but instead doesn't return everything, but only the part of the buffer, which follows after the current read offset.
+The returned pointer will be allocated by buffer_get_remainder() with a size of buffer_left(). It's up to the caller to free() the returned pointer later on.
+Example: suppose you've got a buffer with the following content:
+Then:
+| [in] | b | The Buffer object to read from. |
| char* buffer_get_str | +( | +Buffer * | +b | ) | ++ |
Read the whole Buffer content as string.
+Access the Buffer content as string (char *).
+The returned pointer is allocated and filled with data up to buffer_size(Buffer), however, the allocated memory might be more than size, in fact it will be a multitude of Buffer-blocksize.
+The byte after buffer_size(Buffer) will be a \0.
+Don't free() the pointer directly, use buffer_free() always.
+Sample usage:
+| [in] | b | The Buffer object to read from. |
| void buffer_info | +( | +const Buffer * | +b | ) | ++ |
Print Buffer counters to stderr.
+| [in] | b | The Buffer object to print infos about. |
| uint16_t buffer_last16 | +( | +Buffer * | +b | ) | ++ |
Read the last 2 byte (16 bit) number from a Buffer.
+Doesn't increment offset.
+| [in] | b | The Buffer object to read from. |
| uint32_t buffer_last32 | +( | +Buffer * | +b | ) | ++ |
Read the last 4 byte (32 bit) number from a Buffer.
+Doesn't increment offset.
+| [in] | b | The Buffer object to read from. |
| uint64_t buffer_last64 | +( | +Buffer * | +b | ) | ++ |
Read the last 8 byte (64 bit) number from a Buffer.
+Doesn't increment offset.
+| [in] | b | The Buffer object to read from. |
| uint8_t buffer_last8 | +( | +Buffer * | +b | ) | ++ |
Read the last 1 byte (8 bit) number from a Buffer.
+Doesn't increment offset.
+| [in] | b | The Buffer object to read from. |
| size_t buffer_left | +( | +const Buffer * | +b | ) | ++ |
Tell how much data is left to read in the Buffer.
+Use this function to check if it's ok to read more bytes from to buffer to avoid buffer overflows.
+Example: suppose you've got a buffer with the following content:
+Then:
+| [in] | b | The Buffer object to get the size from. |
| Buffer* buffer_new | +( | +size_t | +blocksize, | +
| + | + | char * | +name | +
| + | ) | ++ |
Create a new buffer.
+Create a new buffer, initially alloc'd to blocksize and zero-filled.
+| [in] | blocksize | Initial blocksize. The smaller the more often the buffer will be resized. Choose with care. |
| [in] | name | A name for the Buffer. Just used for debugging purposes or in error messages. |
| Buffer* buffer_new_buf | +( | +char * | +name, | +
| + | + | void * | +data, | +
| + | + | size_t | +datasize | +
| + | ) | ++ |
Create a new buffer from existing data.
+Create a new buffer, but don't allocate memory nor copy data. Instead the provided data pointer will be used as internal storage directly.
+This kind of buffer can be used to put the Buffer API into use with existing data from other sources. In most cases you'll use it for reading. However, please be aware, that it can be used for writing as well and in this case the data pointer maybe resized (by calling realloc()).
+When calling buffer_free() on this Buffer, the memory pointed to by the given data pointer will not be free'd and remains accessible. It's the responsibility of the caller to do so.
+Example using mmap(2):
+| [in] | name | A name for the Buffer. Just used for debugging purposes or in error messages. |
| [in] | data | The data pointer to use by the buffer. |
| [in] | datasize | The size of the data. |
| Buffer* buffer_new_str | +( | +char * | +name | ) | ++ |
Create a new string buffer.
+Create a new buffer, initially alloc'd to a blocksize of 32 bytes and zero-filled. The buffer will be a string buffer. See buffer_get_str().
+| [in] | name | A name for the Buffer. Just used for debugging purposes or in error messages. |
| void buffer_rewind | +( | +Buffer * | +b | ) | ++ |
Put read offset back to start.
+This function sets the read offset counter back to 0 (start of the buffer).
+| [in] | b | The Buffer object. |
| size_t buffer_size | +( | +const Buffer * | +b | ) | ++ |
Tell how much data there is in the buffer available.
+This function returns the number of bytes stored in the buffer so far. Please note, that the actual allocation might be bigger, because we always allocate memory blockwise.
+| [in] | b | The Buffer object to get the size from. |
+ 1.8.2
+
+
+
diff --git a/man/html/group__CRYPTO.html b/man/html/group__CRYPTO.html
new file mode 100644
index 0000000..2db4a4e
--- /dev/null
+++ b/man/html/group__CRYPTO.html
@@ -0,0 +1,595 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
Functions for symmetrical or asymmetrical encryption using NaCL. +More...
++Functions | |
| unsigned char * | pcp_box_encrypt (pcp_key_t *secret, pcp_pubkey_t *pub, unsigned char *message, size_t messagesize, size_t *csize) |
| Asymmetrically encrypt a message. | |
| unsigned char * | pcp_box_decrypt (pcp_key_t *secret, pcp_pubkey_t *pub, unsigned char *cipher, size_t ciphersize, size_t *dsize) |
| Asymmetrically decrypt a message. | |
| size_t | pcp_encrypt_stream (Pcpstream *in, Pcpstream *out, pcp_key_t *s, pcp_pubkey_t *p, int signcrypt) |
| Asymmetrically encrypt a file or a buffer stream. | |
| size_t | pcp_encrypt_stream_sym (Pcpstream *in, Pcpstream *out, unsigned char *symkey, int havehead, pcp_rec_t *recsign) |
| Symmetrically encrypt a file or a buffer stream. | |
| size_t | pcp_decrypt_stream (Pcpstream *in, Pcpstream *out, pcp_key_t *s, unsigned char *symkey, int verify) |
| Asymmetrically decrypt a file or a buffer stream. | |
| size_t | pcp_decrypt_stream_sym (Pcpstream *in, Pcpstream *out, unsigned char *symkey, pcp_rec_t *recverify) |
| Symmetrically decrypt a file or a buffer stream. | |
| size_t | pcp_sodium_mac (unsigned char **cipher, unsigned char *cleartext, size_t clearsize, unsigned char *nonce, unsigned char *key) |
| Symmetrically encrypt a message. | |
| int | pcp_sodium_verify_mac (unsigned char **cleartext, unsigned char *message, size_t messagesize, unsigned char *nonce, unsigned char *key) |
| Decrypt a symmetrically encrypted message. | |
Functions for symmetrical or asymmetrical encryption using NaCL.
+Encryption is done 32k blockwise using an ephemeral key.
+If using asymmetrical encryption the ephemeral key is encrypted asymmetrically using Curve25519 for all recipients and added to the output.
+If sign+crypt is requested, a hash of the clear content plus the recipient list will be made and signed. That signature will be encrypted using the ephemeral key as well and appended to the output.
+For each encryption cycle (per block) a unique nonce will be used.
+Encrypted output will always written as binary files. No armoring supported yet. The encryption process works as this:
+Symmetric encryption works the very same with the recipient stuff left out.
+Formal format description, asymmetric encrypted files:
++---------------------------------------------------------+ + | Field Size Description | + +-------------+--------+----------------------------------+ + | Type | 1 | Filetype, 5=ASYM, 23=SYM | + +-------------|--------|----------------------------------+ + | Len R | 4 | Number of recipients (*) | + +-------------|--------|----------------------------------+ + | Recipients | R*72 | C(recipient)|C(recipient)... (*) | + +-------------|--------|----------------------------------+ + | Encrypted | ~ | The actual encrypted data | + +-------------|--------|----------------------------------+ +
The following will be Left out when doing symetric encryption.
+Recipient field format:
++---------------------------------------------------------+ + | Field Size Description | + +-------------+--------+----------------------------------+ + | Nonce | 24 | Random Nonce, one per R | + +-------------|--------|----------------------------------+ + | Cipher | 48 | S encrypted with PK or R | + +-------------|--------|----------------------------------+ +
R is calculated using public key encryption using the senders secret key, the recipients public key and a random nonce.
+Pseudocode:
+where P is the public key of a recipient, SK is the senders secret key, R is the recipient list, L is the number of recipients, T is the filetype header, I is a block of input with a size of 32k, N is a nonce (new per block) and S the symmetric key.
+| unsigned char* pcp_box_decrypt | +( | +pcp_key_t * | +secret, | +
| + | + | pcp_pubkey_t * | +pub, | +
| + | + | unsigned char * | +cipher, | +
| + | + | size_t | +ciphersize, | +
| + | + | size_t * | +dsize | +
| + | ) | ++ |
Asymmetrically decrypt a message.
+This function is used internally and normally a user doesn't need to use it. However, from time to time there maybe the requirement to work with raw NaCL crypto_box() output. This function adds the neccessary padding and it uses PCP key structures.
+| [in] | secret | The secret key structure from the sender. |
| [in] | pub | The public key structure from the recipient. |
| [in] | cipher | The encrypted message. |
| [in] | ciphersize | The size in bytes of the encrypted message. |
| [out] | dsize | A pointer which will be set to the size of the decrypted result if successful. |
| unsigned char* pcp_box_encrypt | +( | +pcp_key_t * | +secret, | +
| + | + | pcp_pubkey_t * | +pub, | +
| + | + | unsigned char * | +message, | +
| + | + | size_t | +messagesize, | +
| + | + | size_t * | +csize | +
| + | ) | ++ |
Asymmetrically encrypt a message.
+This function is used internally and normally a user doesn't need to use it. However, from time to time there maybe the requirement to work with raw NaCL crypto_box() output. This function adds the neccessary padding and it uses PCP key structures.
+| [in] | secret | The secret key structure from the sender. |
| [in] | pub | The public key structure from the recipient. |
| [in] | message | The clear unencrypted message. |
| [in] | messagesize | The size in bytes of the message. |
| [out] | csize | A pointer which will be set to the size of the encrypted result if successful. |
| size_t pcp_decrypt_stream | +( | +Pcpstream * | +in, | +
| + | + | Pcpstream * | +out, | +
| + | + | pcp_key_t * | +s, | +
| + | + | unsigned char * | +symkey, | +
| + | + | int | +verify | +
| + | ) | ++ |
Asymmetrically decrypt a file or a buffer stream.
+This function decrypts a stream 32k+16-blockwise for a number of recipients.
+Calls pcp_decrypt_stream_sym() after assembling the encrypted recipient list.
+FIXME: should return the pcp_rec_t structure upon successfull verification somehow.
+| [in] | in | Stream to read the data to decrypt from. |
| [out] | out | Stream to write decrypted result to. |
| [in] | s | Secret key structure of the recipient. |
| [in] | symkey | Ephemeral key for symmetric decryption. Set to NULL if you call this function directly. |
| verify | Flag to indicate sign+crypt. If 1 it tries to verify a signature, otherwise not. |
| size_t pcp_decrypt_stream_sym | +( | +Pcpstream * | +in, | +
| + | + | Pcpstream * | +out, | +
| + | + | unsigned char * | +symkey, | +
| + | + | pcp_rec_t * | +recverify | +
| + | ) | ++ |
Symmetrically decrypt a file or a buffer stream.
+This function decrypts a stream 32k+16-blockwise using a given ephemeral key. Usually compute this key using the pcp_scrypt() function. If not called directly, the key have been extracted from the recipient list.
+Uses crypto_secret_box_open() for each 32k+16-block with a random nonce for each.
+| [in] | in | Stream to read the data to decrypt from. |
| [out] | out | Stream to write decrypted result to. |
| [in] | symkey | Ephemeral key to use for decryption. |
| recverify | Flag to indicate sign+crypt. If 1 it tries to verify a signature, otherwise not. |
| size_t pcp_encrypt_stream | +( | +Pcpstream * | +in, | +
| + | + | Pcpstream * | +out, | +
| + | + | pcp_key_t * | +s, | +
| + | + | pcp_pubkey_t * | +p, | +
| + | + | int | +signcrypt | +
| + | ) | ++ |
Asymmetrically encrypt a file or a buffer stream.
+This function encrypts a stream 32k-blockwise for a number of recipients.
+Calls pcp_encrypt_stream_sym() after assembling the encrypted recipient list.
+| [in] | in | Stream to read the data to encrypt from. |
| [out] | out | Stream to write encrypted result to. |
| [in] | s | Secret key structure of the sender. |
| [in] | p | Public key hash containing a list of the recipients. |
| signcrypt | Flag to indicate sign+crypt. If 1 it adds a signature, otherwise not. |
| size_t pcp_encrypt_stream_sym | +( | +Pcpstream * | +in, | +
| + | + | Pcpstream * | +out, | +
| + | + | unsigned char * | +symkey, | +
| + | + | int | +havehead, | +
| + | + | pcp_rec_t * | +recsign | +
| + | ) | ++ |
Symmetrically encrypt a file or a buffer stream.
+This function encrypts a stream 32k-blockwise using a given ephemeral key. Usually compute this key using the pcp_scrypt() function.
+Uses crypto_secret_box() for each 32k-block with a random nonce for each.
+| [in] | in | Stream to read the data to encrypt from. |
| [out] | out | Stream to write encrypted result to. |
| [in] | symkey | Ephemeral key to use for encryption. |
| [in] | havehead | Flag to indicate if the file header has already been written. Set to 0 if you call this function directly in order to do symmetrical encryption. |
| recsign | Recipient list, set this to NULL if you call this function directly. |
| size_t pcp_sodium_mac | +( | +unsigned char ** | +cipher, | +
| + | + | unsigned char * | +cleartext, | +
| + | + | size_t | +clearsize, | +
| + | + | unsigned char * | +nonce, | +
| + | + | unsigned char * | +key | +
| + | ) | ++ |
Symmetrically encrypt a message.
+This function encrypts a message symmetrically using crypto_secretbox() using the given Curve25519 raw secret key and the nonce.
+It allocates apropriate memory for the result, which will be stored in cipher.
+| [out] | cipher | Encrypted result. |
| [in] | cleartext | Clear message. |
| [in] | clearsize | Size of message. |
| [in] | nonce | A random nonce (24 Bytes). |
| [in] | key | A Curve25519 key (32 Bytes). |
| int pcp_sodium_verify_mac | +( | +unsigned char ** | +cleartext, | +
| + | + | unsigned char * | +message, | +
| + | + | size_t | +messagesize, | +
| + | + | unsigned char * | +nonce, | +
| + | + | unsigned char * | +key | +
| + | ) | ++ |
Decrypt a symmetrically encrypted message.
+This function decrypts a symmetrically encrypted message using crypto_secretbox_open() using the given Curve25519 raw secret key and the nonce.
+It allocates apropriate memory for the result, which will be stored in cleartext.
+| [out] | cleartext | The decrypted result. |
| [in] | message | The encrypted message. |
| [in] | messagesize | Size of message. |
| [in] | nonce | A random nonce (24 Bytes). |
| [in] | key | A Curve25519 key (32 Bytes). |
+ 1.8.2
+
+
+
diff --git a/man/html/group__ED.html b/man/html/group__ED.html
new file mode 100644
index 0000000..71906e4
--- /dev/null
+++ b/man/html/group__ED.html
@@ -0,0 +1,442 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
ED25519 signature functions. +More...
++Functions | |
| unsigned char * | pcp_ed_sign (unsigned char *message, size_t messagesize, pcp_key_t *s) |
| Sign a raw message. | |
| unsigned char * | pcp_ed_sign_key (unsigned char *message, size_t messagesize, pcp_key_t *s) |
| Sign a raw message using s->mastersecret. | |
| unsigned char * | pcp_ed_verify (unsigned char *signature, size_t siglen, pcp_pubkey_t *p) |
| Verify a signature. | |
| unsigned char * | pcp_ed_verify_key (unsigned char *signature, size_t siglen, pcp_pubkey_t *p) |
| Verify a signature using the mastersecret. | |
| size_t | pcp_ed_sign_buffered (Pcpstream *in, Pcpstream *out, pcp_key_t *s, int z85) |
| Sign a stream in 32k block mode. | |
| pcp_pubkey_t * | pcp_ed_verify_buffered (Pcpstream *in, pcp_pubkey_t *p) |
| Verify a signature from a stream in 32k block mode. | |
| size_t | pcp_ed_detachsign_buffered (Pcpstream *in, Pcpstream *out, pcp_key_t *s) |
| Generate a detached signature from a stream in 32k block mode. | |
| pcp_pubkey_t * | pcp_ed_detachverify_buffered (Pcpstream *in, Pcpstream *sigfd, pcp_pubkey_t *p) |
| Verify a detached signature from a stream in 32k block mode. | |
ED25519 signature functions.
+| size_t pcp_ed_detachsign_buffered | +( | +Pcpstream * | +in, | +
| + | + | Pcpstream * | +out, | +
| + | + | pcp_key_t * | +s | +
| + | ) | ++ |
Generate a detached signature from a stream in 32k block mode.
+This function reads blockwise from the stream in and generates a hash of the contents of the stream. It then signs that hash and writes the hash and the signature to the output stream out.
+| [in] | in | Stream to read from. |
| [out] | out | Stream to write to. |
| [in] | s | Pointer to secret key. |
| pcp_pubkey_t* pcp_ed_detachverify_buffered | +( | +Pcpstream * | +in, | +
| + | + | Pcpstream * | +sigfd, | +
| + | + | pcp_pubkey_t * | +p | +
| + | ) | ++ |
Verify a detached signature from a stream in 32k block mode.
+This function reads blockwise from the stream in and generates a hash of the contents of the stream. It then reads the signature from the stream sigfd and verifies the signature from it using p->edpub and compares the signature hash with the hash it calculated from the signed content.
+| [in] | in | Stream to read from. |
| [in] | sigfd | Stream containing the detached signature. |
| [in] | p | Pointer to public key structure. |
| unsigned char* pcp_ed_sign | +( | +unsigned char * | +message, | +
| + | + | size_t | +messagesize, | +
| + | + | pcp_key_t * | +s | +
| + | ) | ++ |
Sign a raw message.
+Sign a message of messagesize using s->edsecret. This is just a convenience wrapper around crypto_sign().
+| [in] | message | The message to sign. |
| [in] | messagesize | Size of the message. |
| [in] | s | Pointer to secret key structure. |
| size_t pcp_ed_sign_buffered | +( | +Pcpstream * | +in, | +
| + | + | Pcpstream * | +out, | +
| + | + | pcp_key_t * | +s, | +
| + | + | int | +z85 | +
| + | ) | ++ |
Sign a stream in 32k block mode.
+This function reads blockwise from the stream in and generates a hash of the contents of the stream. It outputs the stream to out, also blockwise and appends the signature afterwards, which consists of the hash+nacl-signature.
+| [in] | in | Stream to read from. |
| [out] | out | Stream to write to. |
| [in] | s | Pointer to secret key. |
| [in] | z85 | Flag which indicates if to create an armored signature or not. 1=armored, 0=raw. |
| unsigned char* pcp_ed_sign_key | +( | +unsigned char * | +message, | +
| + | + | size_t | +messagesize, | +
| + | + | pcp_key_t * | +s | +
| + | ) | ++ |
Sign a raw message using s->mastersecret.
+The same as pcp_ed_sign() but uses the mastersecret for signing. Usually used for key signing only.
+| [in] | message | The message to sign. |
| [in] | messagesize | Size of the message. |
| [in] | s | Pointer to secret key structure. |
| unsigned char* pcp_ed_verify | +( | +unsigned char * | +signature, | +
| + | + | size_t | +siglen, | +
| + | + | pcp_pubkey_t * | +p | +
| + | ) | ++ |
Verify a signature.
+Verify a signature of size siglen using p->edpub.
+The signature must contain the message+nacl signature (with size crypto_sign_BYTES).
+| [in] | signature | Message+signature. |
| [in] | siglen | Size of message+signature. |
| [in] | p | Pointer to public key structure. |
| pcp_pubkey_t* pcp_ed_verify_buffered | +( | +Pcpstream * | +in, | +
| + | + | pcp_pubkey_t * | +p | +
| + | ) | ++ |
Verify a signature from a stream in 32k block mode.
+This function reads blockwise from the stream in and generates a hash of the contents of the stream. While reading from the stream it extracts the appended signature (hash+sig). It then verifies the signature using p->edpub and compares the signature hash with the hash it calculated from the signed content.
+The parameter p can be NULL. In this case the function loops through the global public key hash pcppubkey_hash to find a public key which is able to verify the signature.
+| [in] | in | Stream to read from. |
| [in] | p | Pointer to public key structure. |
| unsigned char* pcp_ed_verify_key | +( | +unsigned char * | +signature, | +
| + | + | size_t | +siglen, | +
| + | + | pcp_pubkey_t * | +p | +
| + | ) | ++ |
Verify a signature using the mastersecret.
+Verify a signature of size siglen using p->masterpub.
+The signature must contain the message+nacl signature (with size crypto_sign_BYTES).
+| [in] | signature | Message+signature. |
| [in] | siglen | Size of message+signature. |
| [in] | p | Pointer to public key structure. |
+ 1.8.2
+
+
+
diff --git a/man/html/group__FATALS.html b/man/html/group__FATALS.html
new file mode 100644
index 0000000..7429fd0
--- /dev/null
+++ b/man/html/group__FATALS.html
@@ -0,0 +1,221 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
A couple of functions to catch errors and display them. +More...
++Functions | |
| void | fatal (const char *fmt,...) |
| Set an error message. | |
| void | fatals_ifany () |
| Prints error messages to STDERR, if there are some. | |
| void | fatals_reset () |
| Reset the error variables. | |
| void | fatals_done () |
| Cleans up memory allocation of global error variables. | |
+Variables | |
| char * | PCP_ERR |
| Global variable holding the last error message. | |
| byte | PCP_ERRSET |
| Global variable indicating if an error occurred. | |
| int | PCP_EXIT |
| Exitcode for the pcp commandline utility. | |
A couple of functions to catch errors and display them.
+| void fatal | +( | +const char * | +fmt, | +
| + | + | + | ... | +
| + | ) | ++ |
Set an error message.
+This function gets a printf() like error message, which it stores in the global PCP_ERR variable and sets PCP_ERRSET to 1.
+| [in] | fmt | printf() like format description. |
| [in] | ... | format parameters, if any. |
| void fatals_done | +( | +) | ++ |
Cleans up memory allocation of global error variables.
+ +| void fatals_ifany | +( | +) | ++ |
Prints error messages to STDERR, if there are some.
+FIXME: add something like this which returns the message.
+ +| void fatals_reset | +( | +) | ++ |
Reset the error variables.
+This can be used to ignore previous errors. Use with care.
+ +| PCP_ERR | +
Global variable holding the last error message.
+Can be retrieved with fatals_ifany().
+ +| PCP_ERRSET | +
Global variable indicating if an error occurred.
+ +| PCP_EXIT | +
Exitcode for the pcp commandline utility.
+ +
+ 1.8.2
+
+
+
diff --git a/man/html/group__KEYHASH.html b/man/html/group__KEYHASH.html
new file mode 100644
index 0000000..40a3076
--- /dev/null
+++ b/man/html/group__KEYHASH.html
@@ -0,0 +1,404 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
Uthashes of secret and public key structures. +More...
++Macros | |
| #define | pcphash_iterate(key) |
| Iterate over the list of secret keys. | |
| #define | pcphash_iteratepub(key) |
| Iterate over the list of public keys. | |
+Functions | |
| void | pcphash_init () |
| Initialize the global hashes. | |
| void | pcphash_del (void *key, int type) |
| Delete an entry from a hash. | |
| void | pcphash_clean () |
| Frees the memory allocated by the hashes. | |
| pcp_key_t * | pcphash_keyexists (char *id) |
| Check if a secret key with a given key-id exists in the hash. | |
| pcp_pubkey_t * | pcphash_pubkeyexists (char *id) |
| Check if a publickey with a given key-id exists in the hash. | |
| void | pcphash_add (void *key, int type) |
| Add a key structure to the hash list. | |
| int | pcphash_count () |
| Returns the number of secret keys in the hash. | |
| int | pcphash_countpub () |
| Returns the number of public keys in the hash. | |
+Variables | |
| pcp_key_t * | pcpkey_hash |
| Global hash for secret keys. | |
| pcp_pubkey_t * | pcppubkey_hash |
| Global hash for public keys. | |
| pcp_keysig_t * | pcpkeysig_hash |
| Global hash for key signatures. | |
Uthashes of secret and public key structures.
+Libpcp uses the uthash system to maintain lists of keys. There's one hash per key type. The hash has the same type as the key structure itself, but is global.
+| #define pcphash_iterate | +( | ++ | key | ) | ++ |
Iterate over the list of secret keys.
+Sample use:
+Also, don't free() the keyhash or the temporary key pointer yourself. Use pcphash_clean() instead when done.
+ + + +| #define pcphash_iteratepub | +( | ++ | key | ) | ++ |
Iterate over the list of public keys.
+Sample use:
+Also, don't free() the keyhash or the temporary key pointer yourself. Use pcphash_clean() instead when done.
+ + + +| void pcphash_add | +( | +void * | +key, | +
| + | + | int | +type | +
| + | ) | ++ |
Add a key structure to the hash list.
+| [in] | key | A pointer to the key structure to delete. |
| [in] | type | An integer specifying the key type to delete. |
| void pcphash_clean | +( | +) | ++ |
Frees the memory allocated by the hashes.
+Clears and frees memory of all keys in the hash lists and the hashes themselfes.
+ +| int pcphash_count | +( | +) | ++ |
Returns the number of secret keys in the hash.
+| int pcphash_countpub | +( | +) | ++ |
Returns the number of public keys in the hash.
+| void pcphash_del | +( | +void * | +key, | +
| + | + | int | +type | +
| + | ) | ++ |
Delete an entry from a hash.
+| [in] | key | A pointer to the key structure to delete. |
| [in] | type | An integer specifying the key type to delete. |
| void pcphash_init | +( | +) | ++ |
Initialize the global hashes.
+ +| pcp_key_t* pcphash_keyexists | +( | +char * | +id | ) | ++ |
Check if a secret key with a given key-id exists in the hash.
+| [in] | id | A string with the key-id (max 17 chars incl 0). |
| pcp_pubkey_t* pcphash_pubkeyexists | +( | +char * | +id | ) | ++ |
Check if a publickey with a given key-id exists in the hash.
+| [in] | id | A string with the key-id (max 17 chars incl 0). |
| pcp_key_t* pcpkey_hash | +
Global hash for secret keys.
+ +| pcp_keysig_t* pcpkeysig_hash | +
Global hash for key signatures.
+ +| pcp_pubkey_t* pcppubkey_hash | +
Global hash for public keys.
+ +
+ 1.8.2
+
+
+
diff --git a/man/html/group__KEYS.html b/man/html/group__KEYS.html
new file mode 100644
index 0000000..1f7275d
--- /dev/null
+++ b/man/html/group__KEYS.html
@@ -0,0 +1,710 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
PCP public and secret key functions. +More...
++Classes | |
| struct | _pcp_key_t |
| PCP private key structure. More... | |
| struct | _pcp_pubkey_t |
| PCP public key structure. More... | |
| struct | _pcp_rec_t |
| Encrypted recipient list. More... | |
+Typedefs | |
| typedef struct _pcp_key_t | pcp_key_t |
| Typedef for secret keys. | |
| typedef struct _pcp_pubkey_t | pcp_pubkey_t |
| Typedef for public keys. | |
| typedef struct _pcp_rec_t | pcp_rec_t |
| Typedef for public keys. | |
+Enumerations | |
| enum | _PCP_KEY_TYPES { + PCP_KEY_TYPE_MAINSECRET = 1, +PCP_KEY_TYPE_SECRET = 2, +PCP_KEY_TYPE_PUBLIC = 3, +PCP_KEYSIG_NATIVE = 4, + + PCP_KEYSIG_PBP = 5 + + } |
| Internal key types. More... | |
+Functions | |
| pcp_key_t * | pcpkey_new () |
| Generate a new key structure. | |
| char * | pcppubkey_get_art (pcp_pubkey_t *k) |
| Generate an ASCII art image of the public key. | |
| char * | pcpkey_get_art (pcp_key_t *k) |
| Generate an ASCII art image of the public key part of a secret key. | |
| pcp_key_t * | pcpkey_encrypt (pcp_key_t *key, char *passphrase) |
| Encrypt a secret key structure. | |
| pcp_key_t * | pcpkey_decrypt (pcp_key_t *key, char *passphrase) |
| Decrypt a secret key structure. | |
| pcp_pubkey_t * | pcpkey_pub_from_secret (pcp_key_t *key) |
| Generate a public key structure from a given secret key structure. | |
| char * | pcp_getkeyid (pcp_key_t *k) |
| Calculate a key-id from public key fields. | |
| char * | pcp_getpubkeyid (pcp_pubkey_t *k) |
| Calculate a key-id from public key fields. | |
| unsigned char * | pcppubkey_getchecksum (pcp_pubkey_t *k) |
| Calculate a checksum of a public key. | |
| unsigned char * | pcpkey_getchecksum (pcp_key_t *k) |
| Calculate a checksum of a public key part of the given secret key. | |
| pcp_key_t * | pcpkey_exists (char *id) |
| Checks if a secret key structure is registered in the secret key hash. | |
| pcp_pubkey_t * | pcppubkey_exists (char *id) |
| Checks if a public key structure is registered in the public key hash. | |
| unsigned char * | pcp_gennonce () |
| Generate a nonce. | |
| int | pcp_sanitycheck_pub (pcp_pubkey_t *key) |
| Make a sanity check of the given public key structure. | |
| int | pcp_sanitycheck_key (pcp_key_t *key) |
| Make a sanity check of the given secret key structure. | |
| void | pcp_dumpkey (pcp_key_t *k) |
| Dump a secret key structure to stderr. | |
| void | pcp_dumppubkey (pcp_pubkey_t *k) |
| Dump a public key structure to stderr. | |
PCP public and secret key functions.
+Functions to generate PCP keypairs, de- and encrypt them and various related helpers.
+| typedef struct _pcp_key_t pcp_key_t | +
| typedef struct _pcp_pubkey_t pcp_pubkey_t | +
| typedef struct _pcp_rec_t pcp_rec_t | +
| enum _PCP_KEY_TYPES | +
| void pcp_dumpkey | +( | +pcp_key_t * | +k | ) | ++ |
Dump a secret key structure to stderr.
+| [in] | k | Secret key to dump. |
| void pcp_dumppubkey | +( | +pcp_pubkey_t * | +k | ) | ++ |
Dump a public key structure to stderr.
+| [in] | k | Public key to dump. |
| unsigned char* pcp_gennonce | +( | +) | ++ |
Generate a nonce.
+This function generates a 24 byte nonce used for cryptographic functions. It allocates the memory and the caller is responsible to clear and free() it after use.
+| char* pcp_getkeyid | +( | +pcp_key_t * | +k | ) | ++ |
Calculate a key-id from public key fields.
+This function calculates 2 JEN Hashes: one from the 'pub' field and one from the 'edpub' field. It the puts them together into a newly allocated char pointer of 17 bytes length as hex, terminated with a 0.
+The key-id is supposed to be collision save, but there's no guarantee. However, it's used locally only, it wont be transmitted over the network and it's not part of any exported packet.
+| [in] | k | The secret key structure. |
| char* pcp_getpubkeyid | +( | +pcp_pubkey_t * | +k | ) | ++ |
Calculate a key-id from public key fields.
+This does the same as pcp_getkeyid() but uses a pcp_pubkey_t as input.
+| [in] | k | The public key structure. |
| int pcp_sanitycheck_key | +( | +pcp_key_t * | +key | ) | ++ |
Make a sanity check of the given secret key structure.
+| [in] | key | The secret key structure. |
| int pcp_sanitycheck_pub | +( | +pcp_pubkey_t * | +key | ) | ++ |
Make a sanity check of the given public key structure.
+| [in] | key | The public key structure. |
| pcp_key_t* pcpkey_decrypt | +( | +pcp_key_t * | +key, | +
| + | + | char * | +passphrase | +
| + | ) | ++ |
Decrypt a secret key structure.
+The given passphrase will be used to calculate an encryption key using the scrypt() function.
+The encryption key will be used to decrypt the 'encrypted' field of the structure. If it works, the result will be dissected and put into the correspondig secret key fields.
+The data structure will be modified directly, no new memory will be allocated.
+The caller is responsible to clear the passphrase right after use and free() it as soon as possible.
+| [in,out] | key | The secret key structure. |
| [in] | passphrase | The passphrase used to decrypt the key. |
| pcp_key_t* pcpkey_encrypt | +( | +pcp_key_t * | +key, | +
| + | + | char * | +passphrase | +
| + | ) | ++ |
Encrypt a secret key structure.
+The given passphrase will be used to calculate an encryption key using the scrypt() function.
+The secret keys will be concatenated and encrypted, the result will be put into the 'encrypted' field. The first byte of each secret key field will be set to 0 to indicate the key is encrypted.
+The data structure will be modified directly, no new memory will be allocated.
+The caller is responsible to clear the passphrase right after use and free() it as soon as possible.
+| [in,out] | key | The secret key structure. |
| [in] | passphrase | The passphrase used to encrypt the key. |
| pcp_key_t* pcpkey_exists | +( | +char * | +id | ) | ++ |
Checks if a secret key structure is registered in the secret key hash.
+Returns a pointer to a pcp_key_t structure if there exists a secret key structure with the given id in the secret key hash.
+FIXME: needs to be moved to keyhash.h.
+| [in] | id | A null-terminated char pointer of 17 bytes containing a key-id. |
| char* pcpkey_get_art | +( | +pcp_key_t * | +k | ) | ++ |
Generate an ASCII art image of the public key part of a secret key.
+see pcppubkey_get_art() for details.
+| [in] | k | The secret key structure. |
| unsigned char* pcpkey_getchecksum | +( | +pcp_key_t * | +k | ) | ++ |
Calculate a checksum of a public key part of the given secret key.
+ +| [in] | k | The secret key structure. |
| pcp_key_t* pcpkey_new | +( | +) | ++ |
Generate a new key structure.
+Owner and mail field must be filled by the caller. Memory for the returned pointer will be allocated by the function.
+| pcp_pubkey_t* pcpkey_pub_from_secret | +( | +pcp_key_t * | +key | ) | ++ |
Generate a public key structure from a given secret key structure.
+This function extracts all required fields and fills a newly allocated pcp_pubkey_t structure.
+The caller is responsible to clear and free() it after use.
+| [in] | key | The secret key structure. |
| pcp_pubkey_t* pcppubkey_exists | +( | +char * | +id | ) | ++ |
Checks if a public key structure is registered in the public key hash.
+Returns a pointer to a pcp_pubkey_t structure if there exists a public key structure with the given id in the public key hash.
+FIXME: needs to be moved to keyhash.h.
+| [in] | id | A null-terminated char pointer of 17 bytes containing a key-id. |
| char* pcppubkey_get_art | +( | +pcp_pubkey_t * | +k | ) | ++ |
Generate an ASCII art image of the public key.
+This functions originally appeared in OpenSSH rev 1.70, comitted by Alexander von Gernler, published under the BSD license.
+Human beings are bad at memorizing numbers, especially large numbers, but we are very good at recognizing images. This function calculates an ascii art image of a public key, which the user shall always see, when used. If the image changes, the user would immediately recognize the change, even unconsciously.
+Sample random art image from the following public key:
+| [in] | k | The public key structure. |
| unsigned char* pcppubkey_getchecksum | +( | +pcp_pubkey_t * | +k | ) | ++ |
Calculate a checksum of a public key.
+This function calculates a 32 byte checksum of the encryption public key part of the given pcp_pubkey_t structure using crypto_hash_sha256.
+The returned pointer will be allocated and it is the responsibility of the caller to free() ist after use.
+| [in] | k | The public key structure. |
+ 1.8.2
+
+
+
diff --git a/man/html/group__Pcpstream.html b/man/html/group__Pcpstream.html
new file mode 100644
index 0000000..0be6836
--- /dev/null
+++ b/man/html/group__Pcpstream.html
@@ -0,0 +1,467 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
I/O wrapper for files or buffers. +More...
++Classes | |
| struct | _pcp_stream_t |
| An I/O wrapper object backed by a file or a buffer. More... | |
+Typedefs | |
| typedef struct _pcp_stream_t | Pcpstream |
| The name used everywhere. | |
+Functions | |
| Pcpstream * | ps_new_file (FILE *backendfd) |
| Create a new stream, backed with an open file. | |
| Pcpstream * | ps_new_inbuffer (Buffer *b) |
| Create a new input stream, backed with filled a buffer. | |
| Pcpstream * | ps_new_outbuffer () |
| Create a new output stream, backed with a buffer. | |
| size_t | ps_read (Pcpstream *stream, void *buf, size_t readbytes) |
| Read bytes into the given buffer from the current stream. | |
| size_t | ps_write (Pcpstream *stream, void *buf, size_t writebytes) |
| Write bytes from the given buffer into the current stream. | |
| size_t | ps_print (Pcpstream *stream, const char *fmt,...) |
| Write a formatted string to the stream. | |
| size_t | ps_tell (Pcpstream *stream) |
| Tell the current read or write offset. | |
| Buffer * | ps_buffer (Pcpstream *stream) |
| Access the Buffer backend pointer. | |
| void | ps_close (Pcpstream *stream) |
| Close the stream and frees allocated memory. | |
| int | ps_end (Pcpstream *stream) |
| Check if EOF have been reached. | |
| int | ps_err (Pcpstream *stream) |
| Check if an error occurred during a read or write operation. | |
I/O wrapper for files or buffers.
+Simple wrapper around FILE streams or Buffers, depending how the user initialized them. The Pcpstream object behaves always the same and it doesn't matter how it's backed.
+We use it in the lib, e.g. in the crypto routines. That way we can support blockwise crypto on buffers or files.
+Streams are, just like iostreams in c++, either output or input mode.
+| typedef struct _pcp_stream_t Pcpstream | +
The name used everywhere.
+ +Definition at line 63 of file pcpstream.h.
+ +Access the Buffer backend pointer.
+Use this function to access the underlying Buffer object of an output stream to access the contents written to it. Only usefull if the stream have been initialized with ps_new_outbuffer().
+| [in] | stream | The stream object. |
| void ps_close | +( | +Pcpstream * | +stream | ) | ++ |
Close the stream and frees allocated memory.
+If the backend of the stream was a FILE stream, close it, unless it is stdin, stdout or stderr.
+If the backend was a Buffer, clear and free it.
+| [in] | stream | The stream to close. |
| int ps_end | +( | +Pcpstream * | +stream | ) | ++ |
Check if EOF have been reached.
+This function can be used to check if there are no more bytes to read. This will happen if we reach EOF with a FILE backed stream or buffer_done() with a Buffer backed stream.
+| [in] | stream | The stream object. |
| int ps_err | +( | +Pcpstream * | +stream | ) | ++ |
Check if an error occurred during a read or write operation.
+| [in] | stream | The stream object. |
| Pcpstream* ps_new_file | +( | +FILE * | +backendfd | ) | ++ |
Create a new stream, backed with an open file.
+The stream used for in- or output.
+| [in] | backendfd | An open FILE stream. |
Create a new input stream, backed with filled a buffer.
+This kind of stream can be used for reading only.
+| [in] | b | A Buffer object filled with data. |
| Pcpstream* ps_new_outbuffer | +( | +) | ++ |
Create a new output stream, backed with a buffer.
+The buffer used to write data to will be allocated and filled by the class. You can retrieve it later.
+| size_t ps_print | +( | +Pcpstream * | +stream, | +
| + | + | const char * | +fmt, | +
| + | + | + | ... | +
| + | ) | ++ |
Write a formatted string to the stream.
+Use an printf() style format string to print something out to a stream.
+Sets err in case of an error. See ps_err().
+| [out] | stream | The input stream to read from. |
| [in] | fmt | The printf() compatible format description. |
| [in] | ... | A variable number of arguments for the format string. |
| size_t ps_read | +( | +Pcpstream * | +stream, | +
| + | + | void * | +buf, | +
| + | + | size_t | +readbytes | +
| + | ) | ++ |
Read bytes into the given buffer from the current stream.
+This function reads 'readbytes' bytes from the stream into given buf. The buffer needs to be properly allocated by the caller in advance to have at least readbytes len.
+Sets eof=1 if end of file or end of buffer has been reached.
+Sets err=1 if an error occurred, fatals() maybe set, or errno.
+ +| [in] | stream | The input stream to read from. |
| [out] | buf | The buffer where to put read bytes. |
| [in] | readbytes | The number of bytes to read. |
| size_t ps_tell | +( | +Pcpstream * | +stream | ) | ++ |
Tell the current read or write offset.
+This function works like ftell() on a FILE stream or like Buffer->offset in the Buffer class.
+| [in] | stream | The input stream to read from. |
| size_t ps_write | +( | +Pcpstream * | +stream, | +
| + | + | void * | +buf, | +
| + | + | size_t | +writebytes | +
| + | ) | ++ |
Write bytes from the given buffer into the current stream.
+This function writes 'writebytes' bytes from the given buf into the stream
+Sets err in case of an error. See ps_err().
+| [out] | stream | The input stream to write to. |
| [in] | buf | The buffer containing data to put into the stream. |
| [in] | writebytes | The number of bytes to write. |
+ 1.8.2
+
+
+
diff --git a/man/html/group__PubKeyExport.html b/man/html/group__PubKeyExport.html
new file mode 100644
index 0000000..365a287
--- /dev/null
+++ b/man/html/group__PubKeyExport.html
@@ -0,0 +1,310 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
Functions to export and import keys in various formats. +More...
++Functions | |
| Buffer * | pcp_export_rfc_pub (pcp_key_t *sk) |
| RFC4880 alike public key export with some modifications. | |
| Buffer * | pcp_export_pbp_pub (pcp_key_t *sk) |
| Export a public key in PBP format. | |
| Buffer * | pcp_export_yaml_pub (pcp_key_t *sk) |
| Export a public key in yaml format. | |
| Buffer * | pcp_export_perl_pub (pcp_key_t *sk) |
| Export a public key in perl code format. | |
| Buffer * | pcp_export_c_pub (pcp_key_t *sk) |
| Export a public key in C code format. | |
| Buffer * | pcp_export_secret (pcp_key_t *sk, char *passphrase) |
| Export secret key. | |
Functions to export and import keys in various formats.
+Export a public key in C code format.
+Export a public key in C code format.
+| sk | a secret key structure of type pcp_key_t. The secret keys in there have to be already decrypted. |
Export a public key in PBP format.
+Export a public key in the format described at https://github.com/stef/pbp/blob/master/doc/fileformats.txt
+| sk | a secret key structure of type pcp_key_t. The secret keys in there have to be already decrypted. |
Export a public key in perl code format.
+Export a public key in perl code format.
+| sk | a secret key structure of type pcp_key_t. The secret keys in there have to be already decrypted. |
RFC4880 alike public key export with some modifications.
+RFC4880 alike public key export with the following modifications:
+2 = Signature Creation Time (4 byte) + 3 = Signature Expiration Time (4 byte) + 9 = Key Expiration Time (4 bytes) + 20 = Notation Data (4 byte flags, N bytes name+value) + 27 = Key Flags (1 byte, use 0x02, 0x08 and 0x80 +
So, a full pubkey export looks like this
+version + ctime + cipher + 3 x raw keys \ + sigheader > calc hash from this + sigsubs (header+data) / + hash + signature +
We use big-endian always.
+Unlike RC4880 public key exports, we're using Z85 encoding if armoring have been requested by the user. Armored output has a header and a footer line, however they are ignored by the parser and are therefore optional. Newlines, if present, are optional as well.
+http://tools.ietf.org/html/rfc4880#section-5.2.3
+The key sig blob will be saved in the Vault if we import a public key unaltered, so we can verify the signature at will anytime. When exporting a foreign public key, we will just put out that key sig blob to the export untouched.
+Currently PCP only support self-signed public key exports.
+We only support one key signature per key. However, it would be easily possible to support foreign keysigs as well in the future.
+| sk | a secret key structure of type pcp_key_t. The secret keys in there have to be already decrypted. |
| Buffer* pcp_export_secret | +( | +pcp_key_t * | +sk, | +
| + | + | char * | +passphrase | +
| + | ) | ++ |
Export secret key.
+Export a secret key.
+Secret key are exported in proprietary format.
+The exported binary blob is symmetrically encrypted using the NACL function crypto_secret(). The passphrase will be used to derive an encryption key using the STAR function scrypt().
+The binary data before encryption consists of:
+The encrypted cipher will be prepended with the random nonce used to encrypt the data and looks after encryption as such:
+Nonce | Cipher
+| sk | a secret key structure of type pcp_key_t. The secret keys in there have to be already decrypted. |
| passphrase | the passphrase to be used to encrypt the export, a null terminated char array. |
Export a public key in yaml format.
+Export a public key in yaml format.
+| sk | a secret key structure of type pcp_key_t. The secret keys in there have to be already decrypted. |
+ 1.8.2
+
+
+
diff --git a/man/html/group__UTILs.html b/man/html/group__UTILs.html
new file mode 100644
index 0000000..58bee03
--- /dev/null
+++ b/man/html/group__UTILs.html
@@ -0,0 +1,239 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
Various useful helper functions. +More...
++Functions | |
| char * | _lc (char *in) |
| Convert a char array to lowercase. | |
| size_t | _findoffset (unsigned char *bin, size_t binlen, char *sigstart, size_t hlen) |
| Find the offset of some offset marker in some arbitrary data. | |
| void | _xorbuf (unsigned char *iv, unsigned char *buf, size_t xlen) |
| XOR an input buffer with another buffer. | |
| void | _dump (char *n, unsigned char *d, size_t s) |
| Dump binary data as hex to stderr. | |
Various useful helper functions.
+| void _dump | +( | +char * | +n, | +
| + | + | unsigned char * | +d, | +
| + | + | size_t | +s | +
| + | ) | ++ |
Dump binary data as hex to stderr.
+| [in] | n | Description, string. |
| [in] | d | Data to print. |
| [in] | s | Size of d. |
| size_t _findoffset | +( | +unsigned char * | +bin, | +
| + | + | size_t | +binlen, | +
| + | + | char * | +sigstart, | +
| + | + | size_t | +hlen | +
| + | ) | ++ |
Find the offset of some offset marker in some arbitrary data.
+Sample input:
+If you look for the offset of "nacl" within that data, the function will return 9, which is the position within the data where the marker starts.
+| [in] | bin | Aribrary data where to look for the marker. |
| [in] | binlen | The size of the data. |
| [in] | sigstart | The offset marker. |
| [in] | hlen | Size of the offset marker. |
| char* _lc | +( | +char * | +in | ) | ++ |
Convert a char array to lowercase.
+The supplied char array will be directly modified. Use a copy if you want to retain the original.
+| [in,out] | in | The char array to convert. |
| void _xorbuf | +( | +unsigned char * | +iv, | +
| + | + | unsigned char * | +buf, | +
| + | + | size_t | +xlen | +
| + | ) | ++ |
XOR an input buffer with another buffer.
+Both buffers have to have the same size. The input buffer will bei modified directly.
+| [in] | iv | The buffer to XOR with. |
| [in,out] | buf | The buffer which will be XORed with 'iv'. |
| [in] | xlen | The size of the buffers (they must have the same size). |
+ 1.8.2
+
+
+
diff --git a/man/html/group__VAULT.html b/man/html/group__VAULT.html
new file mode 100644
index 0000000..5bc6d8d
--- /dev/null
+++ b/man/html/group__VAULT.html
@@ -0,0 +1,368 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
The vault file is used to store keys and key-signatures on disk. +More...
++Classes | |
| struct | _vault_t |
| This structure represents a vault. More... | |
| struct | _vault_header_t |
| Defines the vault header. More... | |
| struct | _vault_item_header_t |
| An item header. More... | |
+Typedefs | |
| typedef struct _vault_t | vault_t |
| Name of the struct. | |
| typedef struct _vault_header_t | vault_header_t |
| Name of the struct. | |
| typedef struct _vault_item_header_t | vault_item_header_t |
| Name of the struct. | |
+Functions | |
| vault_t * | pcpvault_init (char *filename) |
| Open a vault file. | |
| int | pcpvault_additem (vault_t *vault, void *item, size_t itemsize, uint8_t type) |
| Add an item to the vault. | |
| int | pcpvault_addkey (vault_t *vault, void *item, uint8_t type) |
| Add a key to the vault. | |
| int | pcpvault_close (vault_t *vault) |
| Close a vault file. | |
| int | pcpvault_fetchall (vault_t *vault) |
| Reads in the vault contents. | |
The vault file is used to store keys and key-signatures on disk.
+It works like a keyring.
+The vault file contains all public and secret keys. It's a portable binary file.
+The file starts with a header:
+The checksum is a checksum of all keys.
+The header is followed by the keys. Each key is preceded by an item header which looks like this:
+Type can be one of:
+The item header is followed by the actual key contents.
+| typedef struct _vault_header_t vault_header_t | +
| typedef struct _vault_item_header_t vault_item_header_t | +
| int pcpvault_additem | +( | +vault_t * | +vault, | +
| + | + | void * | +item, | +
| + | + | size_t | +itemsize, | +
| + | + | uint8_t | +type | +
| + | ) | ++ |
Add an item to the vault.
+Adds item with the size itemsize and type type to the vault. Generates the item header and the checksum of the item.
+This function writes directly into the vault file. Use with care. To be safe, use pcpvault_addkey() instead.
+| [out] | vault | The vault object. |
| [in] | item | The item to write. |
| [in] | itemsize | Size of the item. |
| [in] | type | Type of the item. |
| int pcpvault_addkey | +( | +vault_t * | +vault, | +
| + | + | void * | +item, | +
| + | + | uint8_t | +type | +
| + | ) | ++ |
Add a key to the vault.
+This function determines the size of the item to write based on the given type. It converts the internal structure to a binary blob and converty multibyte values to big endian.
+It copies the given vault file to a temporary vault file, adds the item and if this went ok, copies the temporary file back to the original location. It then re-calculates the vault checksum and puts it into the vault header.
+| [out] | vault | The vault object. |
| [in] | item | The item to write (a key or keysig) |
| [in] | type | Type of the item. |
| int pcpvault_close | +( | +vault_t * | +vault | ) | ++ |
Close a vault file.
+If the vault is in unsafed state, write everything to disk and close the vault. Before overwriting the current vault file a backup will be made. If anything fails during writing the backup file will be retained and the error message will contain the filename of the backup file, so that the user doesn't loose data.
+| [out] | vault | The vault object. |
| int pcpvault_fetchall | +( | +vault_t * | +vault | ) | ++ |
Reads in the vault contents.
+This function reads the open vault contents and puts them into the apropriate hashes.
+Currently only known types can be read. If your're saving unknown types to the vault, an error will occur.
+Each item will be converted put into the aproprieate structure, multibyte values will be converted to host endianess. It also calculates the checksum of the vault contents and compares it with the one stored in the vault header. If it doesn't match an error will be thrown.
+| [out] | vault | The vault object. |
| vault_t* pcpvault_init | +( | +char * | +filename | ) | ++ |
Open a vault file.
+If the file doesn't exist, it will be created.
+| [in] | filename | The filename of the vault file. |
+ 1.8.2
+
+
+
diff --git a/man/html/group__Z85.html b/man/html/group__Z85.html
new file mode 100644
index 0000000..af71f6b
--- /dev/null
+++ b/man/html/group__Z85.html
@@ -0,0 +1,308 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
Z85 Encoding functions. +More...
++Functions | |
| unsigned char * | pcp_padfour (unsigned char *src, size_t srclen, size_t *dstlen) |
| Zero-pad some input data. | |
| size_t | pcp_unpadfour (unsigned char *src, size_t srclen) |
| Unpad padded input data. | |
| unsigned char * | pcp_z85_decode (char *z85block, size_t *dstlen) |
| Decode data from Z85 encoding. | |
| char * | pcp_z85_encode (unsigned char *raw, size_t srclen, size_t *dstlen) |
| Encode data to Z85 encoding. | |
| char * | pcp_readz85file (FILE *infile) |
| Read a Z85 encoded file. | |
| char * | pcp_readz85string (unsigned char *input, size_t bufsize) |
| Read a Z85 encoded string. | |
Z85 Encoding functions.
+The Z85 encoding format is described here: ZeroMQ Spec.32. It's part of ZeroMQ. Z85 is based on ASCII85 with a couple of modifications (portability, readability etc).
+To fulfil the requirements of the ZeroMQ Z85 functions, PCP does some additional preparations of raw input before actually doing the encoding, since the input for zmq_z85_encode() must be divisible by 4. Therefore we pad the input with zeroes and remove them after decoding.
+| unsigned char* pcp_padfour | +( | +unsigned char * | +src, | +
| + | + | size_t | +srclen, | +
| + | + | size_t * | +dstlen | +
| + | ) | ++ |
Zero-pad some input data.
+This function allocates new memory for the returned data. It puts the original pointer into it and adds a number of zeros so that the result has a size divisable by 4.
+| [in] | src | Unpadded data. |
| [in] | srclen | Size of unpadded data. |
| [in] | dstlen | Returned size of padded data (pointer to int). |
| char* pcp_readz85file | +( | +FILE * | +infile | ) | ++ |
Read a Z85 encoded file.
+Reads a file and returns the raw Z85 encoded string. It ignores newlines, comments and Headerstrings.
+| [in] | infile | FILE stream to read from. |
| char* pcp_readz85string | +( | +unsigned char * | +input, | +
| + | + | size_t | +bufsize | +
| + | ) | ++ |
Read a Z85 encoded string.
+Parses the given input string and returns the raw Z85 encoded string. It ignores newlines, comments and Headerstrings.
+| [in] | input | Z85 encoded string. |
| [in] | bufsize | Size of the string. |
| size_t pcp_unpadfour | +( | +unsigned char * | +src, | +
| + | + | size_t | +srclen | +
| + | ) | ++ |
Unpad padded input data.
+It just calculates the size of the unpadded result (size - all trailing zeroes). Doesn't allocate any memory or modify anything.
+| [in] | src | Padded data. |
| [in] | srclen | Size of padded data. |
| unsigned char* pcp_z85_decode | +( | +char * | +z85block, | +
| + | + | size_t * | +dstlen | +
| + | ) | ++ |
Decode data from Z85 encoding.
+The input z85block may contain newlines which will be removed.
+| [in] | z85block | The Z85 encoded string. |
| [in] | dstlen | Returned size of decoded data (pointer to int). |
| char* pcp_z85_encode | +( | +unsigned char * | +raw, | +
| + | + | size_t | +srclen, | +
| + | + | size_t * | +dstlen | +
| + | ) | ++ |
Encode data to Z85 encoding.
+Beside Z85 encoding it also adds a newline everiy 72 characters.
+| [in] | raw | Pointer to raw data. |
| [in] | srclen | Size of the data. |
| [in] | dstlen | Returned size of encoded data (pointer to int). |
+ 1.8.2
+
+
+
diff --git a/man/html/index.html b/man/html/index.html
new file mode 100644
index 0000000..efc1d90
--- /dev/null
+++ b/man/html/index.html
@@ -0,0 +1,130 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the API documentation of libpcp, the library behind Pretty Curved Privacy (pcp). The library can be used independently of pcp to manage keys and to encrypt or sign files or buffers.
+For most actual crypto related things, libpcp uses libsodium, the portable NaCL library.
+Example use of the libpcp library:
+To compile the example, use the following commands:
+
+ 1.8.2
+
+
+
diff --git a/man/html/jquery.js b/man/html/jquery.js
new file mode 100644
index 0000000..63939e7
--- /dev/null
+++ b/man/html/jquery.js
@@ -0,0 +1,8 @@
+/*! jQuery v1.7.1 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g| t |
|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/keyhash_8h_source.html b/man/html/keyhash_8h_source.html
new file mode 100644
index 0000000..8fda272
--- /dev/null
+++ b/man/html/keyhash_8h_source.html
@@ -0,0 +1,133 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/keysig_8h_source.html b/man/html/keysig_8h_source.html
new file mode 100644
index 0000000..611590c
--- /dev/null
+++ b/man/html/keysig_8h_source.html
@@ -0,0 +1,119 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/mac_8h_source.html b/man/html/mac_8h_source.html
new file mode 100644
index 0000000..ef4a719
--- /dev/null
+++ b/man/html/mac_8h_source.html
@@ -0,0 +1,113 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/mem_8h_source.html b/man/html/mem_8h_source.html
new file mode 100644
index 0000000..9f9368f
--- /dev/null
+++ b/man/html/mem_8h_source.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/mgmt_8h_source.html b/man/html/mgmt_8h_source.html
new file mode 100644
index 0000000..ecd351f
--- /dev/null
+++ b/man/html/mgmt_8h_source.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/modules.html b/man/html/modules.html
new file mode 100644
index 0000000..3166fac
--- /dev/null
+++ b/man/html/modules.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
| Flexible buffer management, idea from openssh/buffer.c | |
| Functions for symmetrical or asymmetrical encryption using NaCL | |
| A couple of functions to catch errors and display them | |
| ED25519 signature functions | |
| PCP public and secret key functions | |
| Uthashes of secret and public key structures | |
| Functions to export and import keys in various formats | |
| I/O wrapper for files or buffers | |
| Various useful helper functions | |
| The vault file is used to store keys and key-signatures on disk | |
| Z85 Encoding functions |
+ 1.8.2
+
+
+
diff --git a/man/html/nav_f.png b/man/html/nav_f.png
new file mode 100644
index 0000000..72a58a5
Binary files /dev/null and b/man/html/nav_f.png differ
diff --git a/man/html/nav_g.png b/man/html/nav_g.png
new file mode 100644
index 0000000..2093a23
Binary files /dev/null and b/man/html/nav_g.png differ
diff --git a/man/html/nav_h.png b/man/html/nav_h.png
new file mode 100644
index 0000000..33389b1
Binary files /dev/null and b/man/html/nav_h.png differ
diff --git a/man/html/open.png b/man/html/open.png
new file mode 100644
index 0000000..30f75c7
Binary files /dev/null and b/man/html/open.png differ
diff --git a/man/html/pad_8h_source.html b/man/html/pad_8h_source.html
new file mode 100644
index 0000000..08c9a80
--- /dev/null
+++ b/man/html/pad_8h_source.html
@@ -0,0 +1,158 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/pcpstream_8h_source.html b/man/html/pcpstream_8h_source.html
new file mode 100644
index 0000000..65de4cd
--- /dev/null
+++ b/man/html/pcpstream_8h_source.html
@@ -0,0 +1,131 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/plist_8h_source.html b/man/html/plist_8h_source.html
new file mode 100644
index 0000000..7691da4
--- /dev/null
+++ b/man/html/plist_8h_source.html
@@ -0,0 +1,136 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/randomart_8h_source.html b/man/html/randomart_8h_source.html
new file mode 100644
index 0000000..54c9666
--- /dev/null
+++ b/man/html/randomart_8h_source.html
@@ -0,0 +1,114 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/scrypt_8h_source.html b/man/html/scrypt_8h_source.html
new file mode 100644
index 0000000..7b756e8
--- /dev/null
+++ b/man/html/scrypt_8h_source.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__buffer-members.html b/man/html/struct__pcp__buffer-members.html
new file mode 100644
index 0000000..280a80e
--- /dev/null
+++ b/man/html/struct__pcp__buffer-members.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the complete list of members for _pcp_buffer, including all inherited members.
+| allocated | _pcp_buffer | |
| blocksize | _pcp_buffer | |
| buf | _pcp_buffer | |
| end | _pcp_buffer | |
| isstring | _pcp_buffer | |
| name | _pcp_buffer | |
| offset | _pcp_buffer | |
| size | _pcp_buffer |
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__buffer.html b/man/html/struct__pcp__buffer.html
new file mode 100644
index 0000000..ed04d94
--- /dev/null
+++ b/man/html/struct__pcp__buffer.html
@@ -0,0 +1,230 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
A flexible buffer object wich automatically resizes, if neccessary. + More...
+ +#include <buffer.h>
+Public Attributes | |
| char * | name |
| just for convenience in error messages and the like, so we know which buffer cause trouble | |
| uint8_t | allocated |
| marks the buffer as allocated | |
| size_t | blocksize |
| the blocksize to use when resizing, also used for initial malloc() | |
| size_t | size |
| stores the current allocated size of the object | |
| size_t | offset |
| current read position | |
| size_t | end |
| current write position, data end. | |
| uint8_t | isstring |
| treat as char array/string | |
| void * | buf |
| the actual storage buffer | |
A flexible buffer object wich automatically resizes, if neccessary.
+ + +| uint8_t _pcp_buffer::allocated | +
| size_t _pcp_buffer::blocksize | +
| void* _pcp_buffer::buf | +
| size_t _pcp_buffer::end | +
| uint8_t _pcp_buffer::isstring | +
| char* _pcp_buffer::name | +
| size_t _pcp_buffer::offset | +
| size_t _pcp_buffer::size | +
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__key__t-members.html b/man/html/struct__pcp__key__t-members.html
new file mode 100644
index 0000000..23d4f38
--- /dev/null
+++ b/man/html/struct__pcp__key__t-members.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the complete list of members for _pcp_key_t, including all inherited members.
+
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__key__t.html b/man/html/struct__pcp__key__t.html
new file mode 100644
index 0000000..793f968
--- /dev/null
+++ b/man/html/struct__pcp__key__t.html
@@ -0,0 +1,373 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
PCP private key structure. + More...
+ +#include <key.h>
+Public Attributes | |
| byte | masterpub [32] |
| ED25519 master public key signing key. | |
| byte | mastersecret [64] |
| ED25519 master secret key signing key. | |
| byte | pub [32] |
| Curve25519 encryption public key. | |
| byte | secret [32] |
| Curve25519 encryption secret key. | |
| byte | edpub [32] |
| ED25519 public signing key. | |
| byte | edsecret [64] |
| ED25519 secret signing key. | |
| byte | nonce [24] |
| random nonce used to encrypt secret keys | |
| byte | encrypted [176] |
| concatenated and encrypted secret keys | |
| char | owner [255] |
| the key owner, string | |
| char | mail [255] |
| mail address of the owner, string | |
| char | id [17] |
| key-id, used internally only, jenhash of public keys | |
| uint8_t | type |
| key type: MASTER_SECRET or SECRET | |
| uint64_t | ctime |
| creation time, epoch | |
| uint32_t | version |
| key version | |
| uint32_t | serial |
| serial number of the key, randomly generated | |
PCP private key structure.
+Most fields are self explanatory.
+Some notes:
+'encrypted' contains the encrypted secret keys (contatenated mastersecret, secret and edsecret). If it's set, the field 'secret' which contains the clear secret key will be zeroed with random values, the first byte will be 0. Same for the field 'edsecret'.
+'nonce' contains the nonce required to decrypt the encrypted secret, if set.
+'serial' is a random number.
+'id' is a string containing the hex values of the CRC32 checksum of the public and secret key.
+Upon creation everything will be filled with random bytes. String fields will contain a string followed by 0 followed by the rest of the pre-filled random bytes. To denote a string field as empty, the first byte will be set to 0.
+There are dynamically calculated attributes as well:
+'checksum' is a 256 bit SHA hash of the public key returned by pcpkey_getchecksum() or pcppubkey_getchecksum().
+'random id' is a random art ascii image returned by pcppubkey_get_art() or pcpkey_get_art(), calculated from the public key.
+If exported to a single file or printed, the structure will be encoded using Z85 encoding.
+ + +| uint64_t _pcp_key_t::ctime | +
| byte _pcp_key_t::edpub[32] | +
| byte _pcp_key_t::edsecret[64] | +
| byte _pcp_key_t::encrypted[176] | +
| char _pcp_key_t::id[17] | +
| char _pcp_key_t::mail[255] | +
| byte _pcp_key_t::masterpub[32] | +
| byte _pcp_key_t::mastersecret[64] | +
| byte _pcp_key_t::nonce[24] | +
| char _pcp_key_t::owner[255] | +
| byte _pcp_key_t::pub[32] | +
| byte _pcp_key_t::secret[32] | +
| uint32_t _pcp_key_t::serial | +
| uint8_t _pcp_key_t::type | +
| uint32_t _pcp_key_t::version | +
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__pubkey__t-members.html b/man/html/struct__pcp__pubkey__t-members.html
new file mode 100644
index 0000000..7e8ad63
--- /dev/null
+++ b/man/html/struct__pcp__pubkey__t-members.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the complete list of members for _pcp_pubkey_t, including all inherited members.
+
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__pubkey__t.html b/man/html/struct__pcp__pubkey__t.html
new file mode 100644
index 0000000..b53a52b
--- /dev/null
+++ b/man/html/struct__pcp__pubkey__t.html
@@ -0,0 +1,325 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
PCP public key structure. + More...
+ +#include <key.h>
+Public Attributes | |
| byte | masterpub [32] |
| ED25519 master public key signing key. | |
| byte | sigpub [32] |
| ED25519 public signing key. | |
| byte | pub [32] |
| Curve25519 encryption public key. | |
| byte | edpub [32] |
| ED25519 public signing key (FIXME: huh? 2 of them???) | |
| char | owner [255] |
| the key owner, string | |
| char | mail [255] |
| mail address of the owner, string | |
| char | id [17] |
| key-id, used internally only, jenhash of public keys | |
| uint8_t | type |
| key type: MASTER_SECRET or SECRET | |
| uint64_t | ctime |
| creation time, epoch | |
| uint32_t | version |
| key version | |
| uint32_t | serial |
| serial number of the key, randomly generated | |
| uint8_t | valid |
| 1 if import signature verified, 0 if not | |
| byte | signature [crypto_generichash_BYTES_MAX+crypto_sign_BYTES] |
| raw binary blob of pubkey export signature | |
PCP public key structure.
+This structure contains a subset of the pcp_key_t structure without the secret and nonce fields.
+ + +| uint64_t _pcp_pubkey_t::ctime | +
| byte _pcp_pubkey_t::edpub[32] | +
| char _pcp_pubkey_t::id[17] | +
| char _pcp_pubkey_t::mail[255] | +
| byte _pcp_pubkey_t::masterpub[32] | +
| char _pcp_pubkey_t::owner[255] | +
| byte _pcp_pubkey_t::pub[32] | +
| uint32_t _pcp_pubkey_t::serial | +
| byte _pcp_pubkey_t::signature[crypto_generichash_BYTES_MAX+crypto_sign_BYTES] | +
| byte _pcp_pubkey_t::sigpub[32] | +
| uint8_t _pcp_pubkey_t::type | +
| uint8_t _pcp_pubkey_t::valid | +
| uint32_t _pcp_pubkey_t::version | +
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__rec__t-members.html b/man/html/struct__pcp__rec__t-members.html
new file mode 100644
index 0000000..7b269e8
--- /dev/null
+++ b/man/html/struct__pcp__rec__t-members.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the complete list of members for _pcp_rec_t, including all inherited members.
+| cipher | _pcp_rec_t | |
| ciphersize | _pcp_rec_t | |
| pub | _pcp_rec_t | |
| secret | _pcp_rec_t |
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__rec__t.html b/man/html/struct__pcp__rec__t.html
new file mode 100644
index 0000000..659ce4d
--- /dev/null
+++ b/man/html/struct__pcp__rec__t.html
@@ -0,0 +1,155 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
Encrypted recipient list. + More...
+ +#include <key.h>
+Public Attributes | |
| size_t | ciphersize |
| the size of the encrypted recipient list | |
| byte * | cipher |
| contains the whole encrypted recipient list | |
| pcp_key_t * | secret |
| the secret key of the recipient for signing | |
| pcp_pubkey_t * | pub |
| if verification were ok, contains the public key of the signer | |
Encrypted recipient list.
+Encrypted recipient list, required for crypt+sign contains the encrypted recipients and the secret key required for signing the message+recipients.
+Used internally only.
+ + +| byte* _pcp_rec_t::cipher | +
| size_t _pcp_rec_t::ciphersize | +
| pcp_pubkey_t* _pcp_rec_t::pub | +
| pcp_key_t* _pcp_rec_t::secret | +
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__stream__t-members.html b/man/html/struct__pcp__stream__t-members.html
new file mode 100644
index 0000000..309e31c
--- /dev/null
+++ b/man/html/struct__pcp__stream__t-members.html
@@ -0,0 +1,65 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the complete list of members for _pcp_stream_t, including all inherited members.
+| b | _pcp_stream_t | |
| eof | _pcp_stream_t | |
| err | _pcp_stream_t | |
| fd | _pcp_stream_t | |
| is_buffer | _pcp_stream_t |
+ 1.8.2
+
+
+
diff --git a/man/html/struct__pcp__stream__t.html b/man/html/struct__pcp__stream__t.html
new file mode 100644
index 0000000..8f1bbd6
--- /dev/null
+++ b/man/html/struct__pcp__stream__t.html
@@ -0,0 +1,172 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
An I/O wrapper object backed by a file or a buffer. + More...
+ +#include <pcpstream.h>
+Public Attributes | |
| FILE * | fd |
| The backend FILE stream. | |
| Buffer * | b |
| The backend Buffer object. | |
| uint8_t | is_buffer |
| Set to 1 if the backend is a Buffer. | |
| uint8_t | eof |
| Set to 1 if EOF reached. | |
| uint8_t | err |
| Set to 1 if an error occured. | |
An I/O wrapper object backed by a file or a buffer.
+ +Definition at line 54 of file pcpstream.h.
+| Buffer* _pcp_stream_t::b | +
The backend Buffer object.
+ +Definition at line 56 of file pcpstream.h.
+ +| uint8_t _pcp_stream_t::eof | +
Set to 1 if EOF reached.
+ +Definition at line 58 of file pcpstream.h.
+ +| uint8_t _pcp_stream_t::err | +
Set to 1 if an error occured.
+ +Definition at line 59 of file pcpstream.h.
+ +| FILE* _pcp_stream_t::fd | +
The backend FILE stream.
+ +Definition at line 55 of file pcpstream.h.
+ +| uint8_t _pcp_stream_t::is_buffer | +
Set to 1 if the backend is a Buffer.
+ +Definition at line 57 of file pcpstream.h.
+ +
+ 1.8.2
+
+
+
diff --git a/man/html/struct__vault__header__t-members.html b/man/html/struct__vault__header__t-members.html
new file mode 100644
index 0000000..ec8987b
--- /dev/null
+++ b/man/html/struct__vault__header__t-members.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the complete list of members for _vault_header_t, including all inherited members.
+| checksum | _vault_header_t | |
| fileid | _vault_header_t | |
| version | _vault_header_t |
+ 1.8.2
+
+
+
diff --git a/man/html/struct__vault__header__t.html b/man/html/struct__vault__header__t.html
new file mode 100644
index 0000000..36f536e
--- /dev/null
+++ b/man/html/struct__vault__header__t.html
@@ -0,0 +1,135 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
Defines the vault header. + More...
+ +#include <vault.h>
+Public Attributes | |
| uint8_t | fileid |
| File id, proprietary. | |
| uint32_t | version |
| File version. | |
| byte | checksum [32] |
| SHA256 checksum over the whole vault. | |
| byte _vault_header_t::checksum[32] | +
| uint8_t _vault_header_t::fileid | +
| uint32_t _vault_header_t::version | +
+ 1.8.2
+
+
+
diff --git a/man/html/struct__vault__item__header__t-members.html b/man/html/struct__vault__item__header__t-members.html
new file mode 100644
index 0000000..d62813c
--- /dev/null
+++ b/man/html/struct__vault__item__header__t-members.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the complete list of members for _vault_item_header_t, including all inherited members.
+| checksum | _vault_item_header_t | |
| size | _vault_item_header_t | |
| type | _vault_item_header_t | |
| version | _vault_item_header_t |
+ 1.8.2
+
+
+
diff --git a/man/html/struct__vault__item__header__t.html b/man/html/struct__vault__item__header__t.html
new file mode 100644
index 0000000..e618ac6
--- /dev/null
+++ b/man/html/struct__vault__item__header__t.html
@@ -0,0 +1,154 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
An item header. + More...
+ +#include <vault.h>
+Public Attributes | |
| uint8_t | type |
| Item type (secret key, public, key, keysig,. | |
| uint32_t | size |
| Size of the item. | |
| uint32_t | version |
| Version of the item. | |
| byte | checksum [32] |
| SHA256 checksum of the item. | |
| byte _vault_item_header_t::checksum[32] | +
| uint32_t _vault_item_header_t::size | +
| uint8_t _vault_item_header_t::type | +
Item type (secret key, public, key, keysig,.
+| uint32_t _vault_item_header_t::version | +
+ 1.8.2
+
+
+
diff --git a/man/html/struct__vault__t-members.html b/man/html/struct__vault__t-members.html
new file mode 100644
index 0000000..35200dd
--- /dev/null
+++ b/man/html/struct__vault__t-members.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This is the complete list of members for _vault_t, including all inherited members.
+| checksum | _vault_t | |
| fd | _vault_t | |
| filename | _vault_t | |
| isnew | _vault_t | |
| mode | _vault_t | |
| modified | _vault_t | |
| size | _vault_t | |
| unsafed | _vault_t | |
| version | _vault_t |
+ 1.8.2
+
+
+
diff --git a/man/html/struct__vault__t.html b/man/html/struct__vault__t.html
new file mode 100644
index 0000000..e2c9af5
--- /dev/null
+++ b/man/html/struct__vault__t.html
@@ -0,0 +1,248 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
This structure represents a vault. + More...
+ +#include <vault.h>
+Public Attributes | |
| char * | filename |
| The filename of the vault (full path) | |
| FILE * | fd |
| Filehandle if opened. | |
| uint8_t | unsafed |
| Flag to tell if the file needs to be written. | |
| uint8_t | isnew |
| Flag to tell if the vault has been newly created. | |
| uint32_t | size |
| Filesize. | |
| time_t | modified |
| mtime | |
| mode_t | mode |
| File mode. | |
| uint32_t | version |
| Vault version. | |
| byte | checksum [32] |
| SHA256 checksum over the whole vault. | |
| byte _vault_t::checksum[32] | +
| FILE* _vault_t::fd | +
| char* _vault_t::filename | +
| uint8_t _vault_t::isnew | +
| uint8_t _vault_t::unsafed | +
| uint32_t _vault_t::version | +
+ 1.8.2
+
+
+
diff --git a/man/html/sync_off.png b/man/html/sync_off.png
new file mode 100644
index 0000000..3b443fc
Binary files /dev/null and b/man/html/sync_off.png differ
diff --git a/man/html/sync_on.png b/man/html/sync_on.png
new file mode 100644
index 0000000..e08320f
Binary files /dev/null and b/man/html/sync_on.png differ
diff --git a/man/html/tab_a.png b/man/html/tab_a.png
new file mode 100644
index 0000000..3b725c4
Binary files /dev/null and b/man/html/tab_a.png differ
diff --git a/man/html/tab_b.png b/man/html/tab_b.png
new file mode 100644
index 0000000..5f6601a
Binary files /dev/null and b/man/html/tab_b.png differ
diff --git a/man/html/tab_h.png b/man/html/tab_h.png
new file mode 100644
index 0000000..fd5cb70
Binary files /dev/null and b/man/html/tab_h.png differ
diff --git a/man/html/tab_s.png b/man/html/tab_s.png
new file mode 100644
index 0000000..ab478c9
Binary files /dev/null and b/man/html/tab_s.png differ
diff --git a/man/html/tabs.css b/man/html/tabs.css
new file mode 100644
index 0000000..9cf578f
--- /dev/null
+++ b/man/html/tabs.css
@@ -0,0 +1,60 @@
+.tabs, .tabs2, .tabs3 {
+ background-image: url('tab_b.png');
+ width: 100%;
+ z-index: 101;
+ font-size: 13px;
+ font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+}
+
+.tabs2 {
+ font-size: 10px;
+}
+.tabs3 {
+ font-size: 9px;
+}
+
+.tablist {
+ margin: 0;
+ padding: 0;
+ display: table;
+}
+
+.tablist li {
+ float: left;
+ display: table-cell;
+ background-image: url('tab_b.png');
+ line-height: 36px;
+ list-style: none;
+}
+
+.tablist a {
+ display: block;
+ padding: 0 20px;
+ font-weight: bold;
+ background-image:url('tab_s.png');
+ background-repeat:no-repeat;
+ background-position:right;
+ color: #283A5D;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ text-decoration: none;
+ outline: none;
+}
+
+.tabs3 .tablist a {
+ padding: 0 10px;
+}
+
+.tablist a:hover {
+ background-image: url('tab_h.png');
+ background-repeat:repeat-x;
+ color: #fff;
+ text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+ text-decoration: none;
+}
+
+.tablist li.current a {
+ background-image: url('tab_a.png');
+ background-repeat:repeat-x;
+ color: #fff;
+ text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+}
diff --git a/man/html/util_8h_source.html b/man/html/util_8h_source.html
new file mode 100644
index 0000000..38d1c79
--- /dev/null
+++ b/man/html/util_8h_source.html
@@ -0,0 +1,106 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/vault_8h_source.html b/man/html/vault_8h_source.html
new file mode 100644
index 0000000..de3149a
--- /dev/null
+++ b/man/html/vault_8h_source.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/version_8h_source.html b/man/html/version_8h_source.html
new file mode 100644
index 0000000..95e9e86
--- /dev/null
+++ b/man/html/version_8h_source.html
@@ -0,0 +1,97 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+
diff --git a/man/html/z85_8h_source.html b/man/html/z85_8h_source.html
new file mode 100644
index 0000000..8d46637
--- /dev/null
+++ b/man/html/z85_8h_source.html
@@ -0,0 +1,109 @@
+
+
+
+
+
+|
+ libpcp
+ 0.2.1
+
+ |
+
+ 1.8.2
+
+
+