wechat-miniprogram / sm-crypto

miniprogram sm crypto library
MIT License
438 stars 88 forks source link

sm4 下,padding:‘none’,无返回数据 #17

Closed hyucheng closed 3 years ago

hyucheng commented 3 years ago

调用情况如下图: image

输出情况如下图: image

JuneAndGreen commented 3 years ago

无填充模式按16字节一个单位算,少于16个字节的会被丢弃。建议传字符串就走默认填充,想自己实现填充或者不填充(注意16个字节一单位的切割方式),那就传处理过的字节数组吧。