Skip to content

Commit

Permalink
Fix formatting of non-standard PRF instances and their listing
Browse files Browse the repository at this point in the history
  • Loading branch information
bwesterb committed May 25, 2020
1 parent bb1458e commit b3b667f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions params.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ func (p Params) String() string {
wString := ""
prfString := ""
if p.Prf == NIST && p.N != 24 {
prfString = "NIST"
prfString = "_NIST"
}
if p.Prf == RFC && p.N == 24 {
prfString = "RFC"
prfString = "_RFC"
}
if p.WotsW != 16 {
wString = fmt.Sprintf("_w%d", p.WotsW)
Expand Down Expand Up @@ -461,6 +461,11 @@ func ListNames2() (names []string) {
p.Func = h
p.WotsW = w
p.N = n
if n == 24 {
p.Prf = NIST
} else {
p.Prf = RFC
}
add(20, 2)
add(20, 4)
add(40, 2)
Expand Down

0 comments on commit b3b667f

Please sign in to comment.