decodeBase64 static method

Uint8List decodeBase64(
  1. String base64Code
)

将 Base64 编码字符串解码为 Uint8List

base64Code Base64字符串

返回结果: Uint8List 解码后的字节数组

示例:

String str = 'aGVsbG8=';
Uint8List bytes = EncryptUtil.decodeBase64(str);
print(utf8.decode(bytes)); // hello

Implementation

static Uint8List decodeBase64(String base64Code) {
  return base64.decode(base64Code);
}