jokorivai / slowaes

Automatically exported from code.google.com/p/slowaes
0 stars 0 forks source link

There is a typo in error messages of strip_PKCS7_padding(): PCKS7 -> PKCS7 #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
def strip_PKCS7_padding(s):
    """return s stripped of PKCS7 padding"""
    if len(s)%16 or not s:
        raise ValueError("String of len %d can't be PCKS7-padded" % len(s))
    numpads = ord(s[-1])
    if numpads > 16:
        raise ValueError("String ending with %r can't be PCKS7-padded" % s[-1])
    return s[:-numpads]

slowaes-0.1a1

Original issue reported on code.google.com by bugzilla...@yandex.ru on 8 Sep 2012 at 2:58