Skip to content

Instantly share code, notes, and snippets.

@mcxiaoke
mcxiaoke / NSData+AESCrypt.h
Created August 30, 2012 07:21 — forked from Harinder/NSData+AESCrypt.h
Adding methods to NSData and NSString using categories to provide AES256 encryption on iOS
//
// NSData+AESCrypt.h
//
// AES Encrypt/Decrypt
// Created by Jim Dovey and 'Jean'
// See http://iphonedevelopment.blogspot.com/2009/02/strong-encryption-for-cocoa-cocoa-touch.html
//
// BASE64 Encoding/Decoding
// Copyright (c) 2001 Kyle Hammond. All rights reserved.
// Original development by Dave Winer.
@chrix2
chrix2 / pkcs7.py
Created November 29, 2012 19:40
Padding PKCS7 on python
import binascii
import StringIO
class PKCS7Encoder(object):
def __init__(self, k=16):
self.k = k
## @param text The padded text for which the padding is to be removed.
# @exception ValueError Raised when the input padding is missing or corrupt.
def decode(self, text):