For some time I struggled with one weird bug reported to CryptoSwift [https://github.com/krzyzanowskim/CryptoSwift]. Few people report [https://github.com/krzyzanowskim/CryptoSwift/issues/57] that sometimes they got mangled result of decryption with AES. Turn out the code that produce mangled output was PKCS7 [https://tools.ietf.…