mirror of https://github.com/jumpserver/jumpserver
perf: 优化去除结尾空字节的写法
parent
1d3135d2d7
commit
1bc6e50b06
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue