Skip to content

Commit

Permalink
password: fix sequencer documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jedib0t committed Apr 20, 2024
1 parent f0545cd commit 8420baf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions password/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Sequencer interface {
First() string
// Get returns the current password in the sequence.
Get() string
// GetN returns the password at location N, given 0 <= N < MaxPossibleWords
// GetN returns the value for N (location in list of possible passwords).
GetN() *big.Int
// GotoN overrides N.
GotoN(n *big.Int) (string, error)
Expand Down Expand Up @@ -110,15 +110,15 @@ func (s *sequencer) Get() string {
return s.get()
}

// GetN returns the password at location N, given 0 <= N <= MaxPossibleWords
// GetN returns the current location in the list of possible passwords.
func (s *sequencer) GetN() *big.Int {
s.mutex.Lock()
defer s.mutex.Unlock()

return new(big.Int).Set(s.n)
}

// GotoN overrides N.
// GotoN overrides the current location in the list of possible passwords.
func (s *sequencer) GotoN(n *big.Int) (string, error) {
s.mutex.Lock()
defer s.mutex.Unlock()
Expand Down

0 comments on commit 8420baf

Please sign in to comment.