1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-30 02:55:23 +00:00
v2fly/proxy/mtproto/auth_test.go
2018-07-04 17:48:48 +02:00

24 lines
348 B
Go

package mtproto_test
import (
"crypto/rand"
"testing"
"v2ray.com/core/common"
. "v2ray.com/core/proxy/mtproto"
. "v2ray.com/ext/assert"
)
func TestInverse(t *testing.T) {
assert := With(t)
b := make([]byte, 64)
common.Must2(rand.Read(b))
bi := Inverse(b)
assert(b[0], NotEquals, bi[0])
bii := Inverse(bi)
assert(bii, Equals, b)
}