Skip to content

Commit

Permalink
new badgets and fix for misspelling
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Mar 23, 2024
1 parent 107d3a1 commit 1e3fb59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

[![GoDoc](https://godoc.org/github.com/lucasmenendez/gosss?status.svg)](https://godoc.org/github.com/lucasmenendez/gosss)
[![Build Status](https://github.com/lucasmenendez/gosss/actions/workflows/main.yml/badge.svg)](https://github.com/lucasmenendez/gosss/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/lucasmenendez/gosss)](https://goreportcard.com/report/github.com/lucasmenendez/gosss)
[![license](https://img.shields.io/github/license/lucasmenendez/gosss)](LICENSE)


`gosss` is a Go library implementing the Shamir's Secret Sharing algorithm, a cryptographic method for splitting a secret into multiple parts. This implementation allows for secure sharing and reconstruction of secrets in a distributed system.

Expand Down
10 changes: 5 additions & 5 deletions sss_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ func TestHideRecoverMessage(t *testing.T) {
}
// get some shares randomly of the total and recover the message
shares := []string{}
choosen := map[string]int{}
for len(choosen) < config.Min {
chosen := map[string]int{}
for len(chosen) < config.Min {
// random number between 0 and 35
idx := rand.Intn(config.Shares)
_, ok := choosen[totalShares[idx]]
_, ok := chosen[totalShares[idx]]
for ok {
idx = rand.Intn(config.Shares)
_, ok = choosen[totalShares[idx]]
_, ok = chosen[totalShares[idx]]
}
choosen[totalShares[idx]] = idx
chosen[totalShares[idx]] = idx
shares = append(shares, totalShares[idx])
}
message, err := RecoverMessage(shares, config)
Expand Down

0 comments on commit 1e3fb59

Please sign in to comment.