pkcs7

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 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(plaintext []byte, blockSize int) []byte

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

func Unpad

func Unpad(plaintext []byte) []byte

Unpad implements PKCS#7 unpadding as defined in RFC2315. It unpads the plaintext by reading the padding amount from the last byte of the plaintext. 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