forked from cocos/cocos-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase64.d.ts
33 lines (33 loc) · 1.05 KB
/
base64.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* mixin cc.Codec.Base64
*/
export declare class Base64 {
static name_: string;
/**
* <p>
* cc.Codec.Base64.decode(input[, unicode=false]) -> String (http://en.wikipedia.org/wiki/Base64).
* </p>
* @function
* @param {String} input The base64 encoded string to decode
* @return {String} Decodes a base64 encoded String
* @example
* //decode string
* cc.Codec.Base64.decode("U29tZSBTdHJpbmc="); // => "Some String"
*/
static decode(input: string): string;
/**
* <p>
* Converts an input string encoded in base64 to an array of integers whose<br/>
* values represent the decoded string's characters' bytes.
* </p>
* @function
* @param {String} input The String to convert to an array of Integers
* @param {Number} bytes
* @return {Array}
* @example
* //decode string to array
* var decodeArr = cc.Codec.Base64.decodeAsArray("U29tZSBTdHJpbmc=");
*/
static decodeAsArray(input: string, bytes: number): number[];
}
export default Base64;