MCPcopy Create free account
hub / github.com/Yihsiwei/GoFileBinder / PKCS7Padding

Function PKCS7Padding

GoFileBinder.go:185–189  ·  view source on GitHub ↗
(ciphertext []byte, blocksize int)

Source from the content-addressed store, hash-verified

183 return strings.Replace(dir, "\\", "/", -1)
184}
185func PKCS7Padding(ciphertext []byte, blocksize int) []byte {
186 padding := blocksize - len(ciphertext)%blocksize
187 padtext := bytes.Repeat([]byte{byte(padding)}, padding)
188 return append(ciphertext, padtext...)
189}
190
191func AesEncrypt(orig string, key string) string {
192 origData := []byte(orig)

Callers 1

AesEncryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected