github.com/v2fly/v2ray-core/v4@v4.45.2/proxy/vmess/aead/kdf_test.go (about)

     1  package aead
     2  
     3  import (
     4  	"encoding/hex"
     5  	"fmt"
     6  	"testing"
     7  
     8  	"github.com/stretchr/testify/assert"
     9  )
    10  
    11  func TestKDFValue(t *testing.T) {
    12  	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")
    13  	fmt.Println(hex.EncodeToString(GeneratedKey))
    14  	assert.Equal(t, "53e9d7e1bd7bd25022b71ead07d8a596efc8a845c7888652fd684b4903dc8892", hex.EncodeToString(GeneratedKey), "Should generate expected KDF Value")
    15  }