Explorar o código

Add Test for the KDF value

Shelikhoo %!s(int64=4) %!d(string=hai) anos
pai
achega
9c9c45fe4f
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  1. 14 0
      proxy/vmess/aead/kdf_test.go

+ 14 - 0
proxy/vmess/aead/kdf_test.go

@@ -0,0 +1,14 @@
+package aead
+
+import (
+	"encoding/hex"
+	"fmt"
+	"github.com/stretchr/testify/assert"
+	"testing"
+)
+
+func TestKDFValue(t *testing.T) {
+	GeneratedKey := KDF([]byte("Demo Key for KDF Value Test"), "Demo Path for KDF Value Test", "Demo Path for KDF Value Test2", "Demo Path for KDF Value Test3")
+	fmt.Println(hex.EncodeToString(GeneratedKey))
+	assert.Equal(t, "53e9d7e1bd7bd25022b71ead07d8a596efc8a845c7888652fd684b4903dc8892", hex.EncodeToString(GeneratedKey), "Should generate expected KDF Value")
+}