赞
踩
import util from '@ohos.util'; base64Decode(base64Str: string): string { try { let arr = new util.Base64Helper().decodeSync(base64Str) let str = this.uint8ArrayToString(arr) return str } catch (err) { QDLogUtils.error(`base64Decode err = ${err}`) } return '' } base64Encode(array: Uint8Array): string { try { let arr = new util.Base64Helper().encodeSync(array) let str = this.uint8ArrayToString(arr) return str } catch (err) { QDLogUtils.error(`base64Encode err = ${err}`) return '' } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。