Files
NapCatQQ/.pnpm-store/v3/files/fe/d1bad5b9cf0ab05777314017fd640c7d55d38039131a7177903f0b78beb250d9f4bce1995500603f64fc8629516dcae6c703441bda4b80d74031c7e5905ad7
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

49 lines
1.9 KiB
Plaintext

export default base64;
export namespace base64 {
/**
* Convenience function for converting a base64 encoded string to an ArrayBuffer instance
* @public
*
* @param {string} data - Base64 representation of data
* @param {boolean} [urlMode] - If set to true, URL mode string will be expected
* @returns {ArrayBuffer} - Decoded data
*/
export function toArrayBuffer(data: string, urlMode?: boolean): ArrayBuffer;
/**
* Convenience function for creating a base64 encoded string from an ArrayBuffer instance
* @public
*
* @param {ArrayBuffer} arrBuf - ArrayBuffer to be encoded
* @param {boolean} [urlMode] - If set to true, URL mode string will be returned
* @returns {string} - Base64 representation of data
*/
export function fromArrayBuffer(arrBuf: ArrayBuffer, urlMode?: boolean): string;
/**
* Convenience function for converting base64 to string
* @public
*
* @param {string} str - Base64 encoded string to be decoded
* @param {boolean} [urlMode] - If set to true, URL mode string will be expected
* @returns {string} - Decoded string
*/
export function toString(str: string, urlMode?: boolean): string;
/**
* Convenience function for converting a javascript string to base64
* @public
*
* @param {string} str - String to be converted to base64
* @param {boolean} [urlMode] - If set to true, URL mode string will be returned
* @returns {string} - Base64 encoded string
*/
export function fromString(str: string, urlMode?: boolean): string;
/**
* Function to validate base64
* @public
* @param {string} encoded - Base64 or Base64url encoded data
* @param {boolean} [urlMode] - If set to true, base64url will be expected
* @returns {boolean} - Valid base64/base64url?
*/
export function validate(encoded: string, urlMode?: boolean): boolean;
export { base64 };
}