mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 21:02:25 +08:00
16 lines
354 B
Go
16 lines
354 B
Go
package encryptor
|
|
|
|
import (
|
|
"encoding/base64"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestGetCipherText_BadIV(t *testing.T) {
|
|
keyData := base64.StdEncoding.EncodeToString([]byte("1234567890123456"))
|
|
badData := base64.StdEncoding.EncodeToString([]byte("1"))
|
|
_, err := GetCipherText(keyData, badData, badData)
|
|
assert.Error(t, err)
|
|
}
|