Pad data using PKCS5
(data)
| 417 | |
| 418 | |
| 419 | def pkcs5_pad(data): |
| 420 | """ |
| 421 | Pad data using PKCS5 |
| 422 | """ |
| 423 | pad = KEYCZAR_AES_BLOCK_SIZE - len(data) % KEYCZAR_AES_BLOCK_SIZE |
| 424 | data = data + pad * chr(pad).encode("utf-8") |
| 425 | return data |
| 426 | |
| 427 | |
| 428 | def pkcs5_unpad(data): |
no outgoing calls
no test coverage detected