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]