Browse Source

fix: 修复密码后空格的问题

pull/8905/head
Aaron3S 2 years ago committed by 老广
parent
commit
a7cd0bc0fe
  1. 3
      apps/common/utils/crypto.py

3
apps/common/utils/crypto.py

@ -82,7 +82,8 @@ class PiicoSM4EcbCrypto(BaseCrypto):
return self.cipher.encrypt(self.to_16(data))
def _decrypt(self, data: bytes) -> bytes:
return self.cipher.decrypt(data)
bs = self.cipher.decrypt(data)
return bs[:bs.index(0)]
class AESCrypto:

Loading…
Cancel
Save