Page MenuHomeMusing Studio

pass_test.go
No OneTemporary

pass_test.go

package auth
import "testing"
const pass = "password"
var hash []byte
func TestHash(t *testing.T) {
var err error
hash, err = HashPass([]byte(pass))
if err != nil {
t.Error("Password hash failed.")
}
}
func TestAuth(t *testing.T) {
if !Authenticated(hash, []byte(pass)) {
t.Error("Didn't authenticate.")
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 6, 12:11 AM (19 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3185974

Event Timeline