diff --git a/api/client.go b/api/client.go index 20545312e0adecad7e4ec195e1395b8176d27bf3..79810a40215f676c6f0554ea48d97f92736c9f8e 100644 --- a/api/client.go +++ b/api/client.go @@ -80,25 +80,25 @@ type Client struct { func NewClient(ndfJSON, storageDir string, password []byte, registrationCode string) error { jww.INFO.Printf("NewClient()") // Use fastRNG for RNG ops (AES fortuna based RNG using system RNG) - jww.INFO.Printf("RNG Creation") rngStreamGen := fastRNG.NewStreamGenerator(12, 3, csprng.NewSystemRNG) - jww.INFO.Printf("Parsing NDF") + // Parse the NDF def, err := parseNDF(ndfJSON) if err != nil { return err } - jww.INFO.Printf("Decoding Groups") + cmixGrp, e2eGrp := decodeGroups(def) - jww.INFO.Printf("Creating New User") + start := time.Now() protoUser := createNewUser(rngStreamGen, cmixGrp, e2eGrp) - jww.INFO.Printf("Setting Up Storage") + jww.DEBUG.Printf("User generation took: %s", time.Now().Sub(start)) + err = checkVersionAndSetupStorage(def, storageDir, password, protoUser, cmixGrp, e2eGrp, rngStreamGen, false, registrationCode) if err != nil { return err } - jww.INFO.Printf("Returning") + //TODO: close the session return nil }