Skip to content

Commit

Permalink
delete useless decode in pkcs7 #152
Browse files Browse the repository at this point in the history
  • Loading branch information
helloqiu committed Aug 26, 2016
1 parent 43e99e4 commit 41052ec
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions werobot/crypto/pkcs7.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,3 @@ def encode(text):
# 获得补位所用的字符
pad = chr(amount_to_pad)
return text + to_binary(pad * amount_to_pad)


def decode(decrypted):
pad = ord(decrypted[-1])
if pad < 1 or pad > 32:
pad = 0
return decrypted[:-pad]

0 comments on commit 41052ec

Please sign in to comment.