pkcs7

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pad

func Pad(data []byte, blockSize int) []byte

Pad implements PKCS#7 padding as defined in RFC2315. It pads the data to the given blockSize in the range [1, 255]. This is normally used in AES-CBC encryption.

func Unpad

func Unpad(data []byte) []byte

Unpad implements PKCS#7 unpadding as defined in RFC2315. It unpads the data by reading the padding amount from the last byte of the data. This is normally used in AES-CBC decryption.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL