proxy.golang.org : github.com/leonelquinteros/pkcs7
This package implements PKCS#7 padding to byte slices. Padding works by calculating the amount of needed padding and repeating that number to fill in the rest of the slice up to the block size. This way, in order to unpad the slice, you check the value held in the last slot and then remove that many bytes from the end. By defniition, PKCS#7 only padds for block sizes between 1 and 255 inclusive. If the supplied byte slice is a multiple of the block size, N, an extra N amount of bytes is appended all of value N. Please review the tests for this package for examples.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/leonelquinteros/pkcs7
License: MIT
Latest release: about 9 years ago
First release: about 9 years ago
Namespace: github.com/leonelquinteros
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 months ago