def pkcs7_unpad(data):
if isinstance(data, str):<EOL><INDENT>return data[<NUM_LIT:0>:-ord(data[-<NUM_LIT:1>])]<EOL><DEDENT>else:<EOL><INDENT>return data[<NUM_LIT:0>:-data[-<NUM_LIT:1>]]<EOL><DEDENT>
Remove the padding bytes that were added at point of encryption.

Implementation copied from pyaspora:
https://github.com/mjnovice/pyaspora/blob/master/pyaspora/diaspora/protocol.py#L209