import * as mod from "https://deno.land/std@0.174.0/encoding/base32.ts";
encode
and decode
for
base32 encoding.
Modified from https://github.com/beatgammit/base64-js
This module is browser compatible.
Examples
Example 1
Example 1
import {
decode,
encode,
} from "https://deno.land/std@0.174.0/encoding/base32.ts";
const b32Repr = "RC2E6GA=";
const binaryData = decode(b32Repr);
console.log(binaryData);
// => Uint8Array [ 136, 180, 79, 24 ]
console.log(encode(binaryData));
// => RC2E6GA=
Functions
Returns number of bytes encoded in the given RFC4648 base32 string input. | |
Decodes a given RFC4648 base32 encoded string. | |
Encodes a given Uint8Array into RFC4648 base32 representation |