INNER CODE UNIT · Go
TestSessionKeyBeforeUpdate
schollz/pake · pake_test.go:155
func TestSessionKeyBeforeUpdate(t *testing.T) {
A, err := InitCurve([]byte{1, 2, 3}, 0, "p256")
if err != nil {
t.Fatal(err)
}
_, err = A.SessionKey()
if err == nil {
t.Error("SessionKey() should return error before Update()")
}
if A.HaveSessionKey() {
t.Error("HaveSessionKey() should return false before Update()")
}
}
func TestMarshalingEdgeCases(t *testing.T) {
// Test normal marshaling works