admin 发表于 2021-4-21 20:31:06

typescript base64编解码实现


encoded = Buffer.from('testbase64').toString('base64')
decoded = Buffer.from(encoded, 'base64').toString()
console.log(encoded)
console.log(decoded)


encoded = Buffer.from('测试base64').toString('base64')
decoded = Buffer.from(encoded, 'base64').toString()
console.log(encoded)
console.log(decoded)


页: [1]
查看完整版本: typescript base64编解码实现