|
|
@ -50,12 +50,12 @@ func TestDecrypto(t *testing.T) { |
|
|
|
func TestPKCS7Padding(t *testing.T) { |
|
|
|
func TestPKCS7Padding(t *testing.T) { |
|
|
|
ltt := []byte("Test_PKCS7Padding") |
|
|
|
ltt := []byte("Test_PKCS7Padding") |
|
|
|
ltt = PKCS7Padding(ltt, aes.BlockSize) |
|
|
|
ltt = PKCS7Padding(ltt, aes.BlockSize) |
|
|
|
fmt.Printf("[%x]\n", (ltt)) |
|
|
|
// fmt.Printf("[%x]\n", (ltt))
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func TestPKCS7UnPadding(t *testing.T) { |
|
|
|
func TestPKCS7UnPadding(t *testing.T) { |
|
|
|
ltt := []byte("Test_PKCS7Padding") |
|
|
|
ltt := []byte("Test_PKCS7Padding") |
|
|
|
ltt = PKCS7Padding(ltt, aes.BlockSize) |
|
|
|
ltt = PKCS7Padding(ltt, aes.BlockSize) |
|
|
|
ltt = PKCS7UnPadding(ltt) |
|
|
|
ltt = PKCS7UnPadding(ltt) |
|
|
|
fmt.Printf("[%x]\n", ltt) |
|
|
|
// fmt.Printf("[%x]\n", ltt)
|
|
|
|
} |
|
|
|
} |
|
|
|