Skip to content
Snippets Groups Projects
Commit b0c55a43 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

adding timing to the new client operations

parent 4c1becaf
No related branches found
No related tags found
1 merge request!23Release
...@@ -80,24 +80,26 @@ type Client struct { ...@@ -80,24 +80,26 @@ type Client struct {
func NewClient(ndfJSON, storageDir string, password []byte, registrationCode string) error { func NewClient(ndfJSON, storageDir string, password []byte, registrationCode string) error {
jww.INFO.Printf("NewClient()") jww.INFO.Printf("NewClient()")
// Use fastRNG for RNG ops (AES fortuna based RNG using system RNG) // Use fastRNG for RNG ops (AES fortuna based RNG using system RNG)
jww.INFO.Printf("RNG Creation")
rngStreamGen := fastRNG.NewStreamGenerator(12, 3, csprng.NewSystemRNG) rngStreamGen := fastRNG.NewStreamGenerator(12, 3, csprng.NewSystemRNG)
rngStream := rngStreamGen.GetStream() rngStream := rngStreamGen.GetStream()
jww.INFO.Printf("Parsing NDF")
// Parse the NDF // Parse the NDF
def, err := parseNDF(ndfJSON) def, err := parseNDF(ndfJSON)
if err != nil { if err != nil {
return err return err
} }
jww.INFO.Printf("Decoding Groups")
cmixGrp, e2eGrp := decodeGroups(def) cmixGrp, e2eGrp := decodeGroups(def)
jww.INFO.Printf("Creating New User")
protoUser := createNewUser(rngStream, cmixGrp, e2eGrp) protoUser := createNewUser(rngStream, cmixGrp, e2eGrp)
jww.INFO.Printf("Setting Up Storage")
err = checkVersionAndSetupStorage(def, storageDir, password, protoUser, err = checkVersionAndSetupStorage(def, storageDir, password, protoUser,
cmixGrp, e2eGrp, rngStreamGen, false, registrationCode) cmixGrp, e2eGrp, rngStreamGen, false, registrationCode)
if err != nil { if err != nil {
return err return err
} }
jww.INFO.Printf("Returning")
//TODO: close the session //TODO: close the session
return nil return nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment