perf: 优化去除结尾空字节的写法

pull/8908/head
Aaron3S 2022-09-26 14:52:13 +08:00 committed by Jiangjie.Bai
parent 1d3135d2d7
commit 1bc6e50b06
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class PiicoSM4EcbCrypto(BaseCrypto):
def _decrypt(self, data: bytes) -> bytes:
bs = self.cipher.decrypt(data)
return bs[:bs.index(0)]
return bs.rstrip(b'\0')
class AESCrypto: