diff options
| author | 2022-10-18 10:22:34 +0200 | |
|---|---|---|
| committer | 2022-10-18 10:22:34 +0200 | |
| commit | d5c81fafc152acda9bed9546a806fd826e220e7f (patch) | |
| tree | 610ca65275a2b65f77f99316e7b3bf2cd1bf880b /doc | |
| parent | Remove docs for peg-grammar (diff) | |
Move pgp docs
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc.mdz | 38 | ||||
| -rw-r--r-- | doc/pgp.mdz | 49 |
2 files changed, 49 insertions, 38 deletions
diff --git a/doc/misc.mdz b/doc/misc.mdz index fce9632..de16716 100644 --- a/doc/misc.mdz +++ b/doc/misc.mdz @@ -333,44 +333,6 @@ array is not sorted beforehand, the results are undefined. Returns the array. # => @[1 2 3 4 5] ``` -## pgp/hex->word - -Returns pgp word for hex string <100 for a position in the number. - -@codeblock[janet]``` -(misc/pgp/hex->word "01" 0) -# => "absurd" -``` - -## pgp/hexs->words - -Returns an array of pgp words for arbitrary long string of hexs. - -Sanitizes out the white space from hex-string. - -@codeblock[janet]``` -(misc/pgp/hexs->words "01d1 02EE") -# => @["absurd" "scavenger" "accrue" "universe"] -``` - -## pgp/word->hex - -Returns a hex number as string for the pgp word. - -@codeblock[janet]``` -(misc/pgp/word->hex "absurd") -# => "01" -``` - -## pgp/words->hexs - -Returns an array of hexs from the string with pgp words. - -@codeblock[janet]``` -(misc/pgp/words->hexs "absurd-scavenger accrue_universe upshot.village") -# => @["01" "D1" "02" "EE" "F4" "F6"] -``` - ## base64/encode Converts a string of any format (UTF-8, binary, ..) to base64 encoding. @codeblock[janet]``` diff --git a/doc/pgp.mdz b/doc/pgp.mdz new file mode 100644 index 0000000..35f430f --- /dev/null +++ b/doc/pgp.mdz @@ -0,0 +1,49 @@ +{:title "PGP" + :author "Josef Pospíšil" + :license "MIT" + :template "mdzdoc/main.html" + :order 99} +--- + +# PGP + +This module contains PGP utils. For now only PGP words and hexs. + +## pgp/hex->word + +Returns pgp word for hex string <100 for a position in the number. + +@codeblock[janet]``` +(misc/pgp/hex->word "01" 0) +# => "absurd" +``` + +## pgp/hexs->words + +Returns an array of pgp words for arbitrary long string of hexs. + +Sanitizes out the white space from hex-string. + +@codeblock[janet]``` +(misc/pgp/hexs->words "01d1 02EE") +# => @["absurd" "scavenger" "accrue" "universe"] +``` + +## pgp/word->hex + +Returns a hex number as string for the pgp word. + +@codeblock[janet]``` +(misc/pgp/word->hex "absurd") +# => "01" +``` + +## pgp/words->hexs + +Returns an array of hexs from the string with pgp words. + +@codeblock[janet]``` +(misc/pgp/words->hexs "absurd-scavenger accrue_universe upshot.village") +# => @["01" "D1" "02" "EE" "F4" "F6"] +``` + |
