Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from Merited/patch-2
Browse files Browse the repository at this point in the history
Made rand.Read handle err that it returns
  • Loading branch information
j03wang committed Dec 6, 2018
2 parents b5fde5a + edc49bb commit fb546be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion correlationvector/spin.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ func SpinWithParameters(correlationVector string, parameters *SpinParameters) (*
}

entropy := make([]byte, int(parameters.Entropy))
rand.Read(entropy)
if _, err := rand.Read(entropy); err != nil {
return nil, err
}

// Ticks is defined as 100 nanoseconds.
ticks := time.Now().UnixNano() / 100
Expand Down

0 comments on commit fb546be

Please sign in to comment.