Use PKCS7 padding, the same as OpenSSL

Added verification of padding at @ericmj's suggestion