Open mishe opened 8 years ago
本方案的基础是需要浏览器支持canvas。
var str=JSON.stringify({a:'中文',b:'sss'}), str2=compressor.compress(str) console.log(str2)
compressor.decompressImage(str2,function(d){ console.log(JSON.parse(d).a) })
字符串加密(转换成图片的base64码)
本方案的基础是需要浏览器支持canvas。
使用方法
转换为图片
还原字符串