Documentation ¶
Overview ¶
Package pkcs7 implements PKCS#7 padding, described at http://tools.ietf.org/html/rfc5652#section-6.3.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBlockSize = errors.New("useless/crypto/pkcs7: block size is out of bounds") ErrByteBlockSize = errors.New("useless/crypto/pkcs7: byte length is not a multiple of the block size") )
Functions ¶
func Pad ¶
Pad adds padding, with each padded byte being the total number of bytes added. Byte slice should always be padded even if its a multiple of the block size. This makes it easier to unpad bytes if we can safely assume they are always padded.
Example for a blocksize of 8: -> [DD DD DD DD 04 04 04 04]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.