diff options
| author | 2022-10-18 10:36:09 +0200 | |
|---|---|---|
| committer | 2022-10-18 10:36:09 +0200 | |
| commit | 16505c148b65a367a3541997d8e89dc49ed1e4eb (patch) | |
| tree | 253712640586553b251a83d7610dca688e0f0cd4 /doc | |
| parent | Move pgp docs (diff) | |
Move Base64 docs
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/base64.mdz | 31 | ||||
| -rw-r--r-- | doc/misc.mdz | 16 |
2 files changed, 31 insertions, 16 deletions
diff --git a/doc/base64.mdz b/doc/base64.mdz new file mode 100644 index 0000000..ae0b8ee --- /dev/null +++ b/doc/base64.mdz @@ -0,0 +1,31 @@ +{:title "Base64" + :author "Josef Pospíšil" + :license "MIT" + :template "mdzdoc/main.html" + :order 99} +--- + +# Base64 + +This module contains Base64 utilities. + +## base64/encode + +Converts a string of any format (UTF-8, binary, ..) to base64 encoding. + +@codeblock[janet]``` +(misc/base64/encode "this is a test") +# => "dGhpcyBpcyBhIHRlc3Q=" +``` + + +## base64/decode + +Converts a base64 encoded string to its binary representation of any format +(UTF-8, binary, ...). + +@codeblock[janet]``` +(misc/base64/decode "dGhpcyBpcyBhIHRlc3Q=") +# => "this is a test" +``` + diff --git a/doc/misc.mdz b/doc/misc.mdz index de16716..519919b 100644 --- a/doc/misc.mdz +++ b/doc/misc.mdz @@ -332,19 +332,3 @@ array is not sorted beforehand, the results are undefined. Returns the array. (misc/array/insert-sorted-by @[1 2 3 5] identity 4) # => @[1 2 3 4 5] ``` - -## base64/encode -Converts a string of any format (UTF-8, binary, ..) to base64 encoding. -@codeblock[janet]``` -(misc/base64/encode "this is a test") -# => "dGhpcyBpcyBhIHRlc3Q=" -``` - - -## base64/decode -Converts a base64 encoded string to its binary representation of any format (UTF-8, binary, ..). -@codeblock[janet]``` -(misc/base64/decode "dGhpcyBpcyBhIHRlc3Q=") -# => "this is a test" -``` - |
