How to use base32-encode - 2 common examples

To help you get started, we’ve selected a few base32-encode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jeffkistler / minilogue-editor / src / components / ProgramLink.jsx View on Github external
render() {
    const sysex = encodeSysexData(encodeProgram(this.props.program));
    const data = pako.deflate(sysex);
    const encodedProgram = base32Encode(data, 'Crockford');
    const location = createLocation(`/?sysex=${encodedProgram}`, null, null, history.location);
    const href = history.createHref(location);
    const current = window.location;
    const url = urljoin(`${current.protocol}//${current.host}`, href);
    return (
      <div style="{{">
        <p>Use this link to share your program</p>
        <input value="{url}" readonly="{true}" style="{{" type="text"> { this.el = el; }}
        /&gt;
        </div>
github yeojz / otplib / packages / otplib-plugin-base32-enc-dec / index.ts View on Github external
export const keyEncoder: KeyEncoder = (
  secret: SecretKey,
  encoding: KeyEncodings
): Base32SecretKey => {
  return base32Encode(Buffer.from(secret, encoding), 'RFC4648', {
    padding: false
  });
};

base32-encode

Base32 encoder with support for multiple variants.

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis

Popular base32-encode functions