import { ALPHABET } from '../constants'
export const base32 = Object.freeze({
+ /**
+ * Convert a base32 string to an ArrayBuffer.
+ *
+ * @param {string} base32 - String to convert
+ * @returns {Uint8Array} Byte array representation of the input string
+ */
+ toBuffer (base32: string): ArrayBuffer {
+ return this.toBytes(base32).buffer
+ },
+
/**
* Convert a base32 string to a Uint8Array of bytes.
*
}
return output
},
-
- /**
- * Convert a base32 string to an ArrayBuffer.
- *
- * @param {string} base32 - String to convert
- * @returns {Uint8Array} Byte array representation of the input string
- */
- toBuffer (base32: string): ArrayBuffer {
- return this.toBytes(base32).buffer
- },
})