JuneAndGreen / sm-crypto

国密算法js版
MIT License
954 stars 254 forks source link

sm4 加密报错 #94

Closed wangzhigang closed 1 year ago

wangzhigang commented 1 year ago

sm4.encrypt('ssssd', '0123456789abcdeffedcba9876543210', {mode: 'cbc', iv: 'fedcba98765432100123456789abcdef'})

Error: padding is invalid

这是为什么?