INNER CODE UNIT · Go

TestNilPakeSessionKey

schollz/pake · pake_test.go:93

func TestNilPakeSessionKey(t *testing.T) {
	var p *Pake

	// Test SessionKey on nil pake - this currently panics due to accessing p.K
	defer func() {
		if r := recover(); r == nil {
			t.Error("SessionKey() should panic for nil pake")
		}
	}()
	p.SessionKey()
}

func TestUpdateInvalidData(t *testing.T) {
	A, err := InitCurve([]byte{1, 2, 3}, 0, "p256")
	if err != nil {
		t.Fatal(err)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…