diff options
Diffstat (limited to 'lib/blocks.go')
-rw-r--r-- | lib/blocks.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/blocks.go b/lib/blocks.go index 452766b..0645fab 100644 --- a/lib/blocks.go +++ b/lib/blocks.go @@ -96,3 +96,8 @@ func Pkcs7Padding(in []byte, k int) []byte { } return in } + +// Removes PKCS#7 Padding from input `in` +func Pkcs7PaddingUndo(in []byte) []byte { + return in[0:(len(in) - int(in[len(in)-1]))] +} |