MCPcopy Create free account
hub / github.com/TideSec/GoBypassAV / PKCS7UNPadding

Function PKCS7UNPadding

Encryption/AES_code/main.go:63–67  ·  view source on GitHub ↗

解码

(originDataByte []byte)

Source from the content-addressed store, hash-verified

61}
62// 解码
63func PKCS7UNPadding(originDataByte []byte) []byte {
64 length := len(originDataByte)
65 unpadding := int(originDataByte[length-1])
66 return originDataByte[:(length-unpadding)]
67}
68
69//加密过程:
70// 1、处理数据,对数据进行填充,采用PKCS7(当密钥长度不够时,缺几位补几个几)的方式。

Callers 1

AesDecryptByECBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected