1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

Add Test for the KDF value

This commit is contained in:
Shelikhoo 2021-02-22 13:25:12 +00:00
parent 0024c6e028
commit 9c9c45fe4f
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -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")
}