Skip to content

Commit

Permalink
Removed dead code.
Browse files Browse the repository at this point in the history
  • Loading branch information
markkurossi committed Mar 30, 2020
1 parent f807eb6 commit 98054a4
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions ot/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ func (l Label) String() string {
return fmt.Sprintf("%016x%016x", l.d0, l.d1)
}

func (l Label) Undefined() bool {
return l.d0 == 0 && l.d1 == 0
}

func (l Label) Equal(o Label) bool {
return l.d0 == o.d0 && l.d1 == o.d1
}
Expand All @@ -52,15 +48,11 @@ func NewLabel(rand io.Reader) (Label, error) {
var buf LabelData
var label Label

for {
if _, err := rand.Read(buf[:]); err != nil {
return label, err
}
label.SetBytes(buf)
if !label.Undefined() {
return label, nil
}
if _, err := rand.Read(buf[:]); err != nil {
return label, err
}
label.SetBytes(buf)
return label, nil
}

func LabelFromData(data LabelData) Label {
Expand Down

0 comments on commit 98054a4

Please sign in to comment.