Skip to content

Commit

Permalink
fix constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Jan 7, 2025
1 parent a44d077 commit 1592b8e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ func NewSHAKE256() *SHAKE {
// cSHAKE is desired. S is a customization byte string used for domain
// separation. When N and S are both empty, this is equivalent to NewSHAKE128.
func NewCSHAKE128(N, S []byte) *SHAKE {
if len(N) == 0 && len(S) == 0 {
return NewSHAKE128()
}
return nil
}

Expand All @@ -122,6 +125,9 @@ func NewCSHAKE128(N, S []byte) *SHAKE {
// cSHAKE is desired. S is a customization byte string used for domain
// separation. When N and S are both empty, this is equivalent to NewSHAKE256.
func NewCSHAKE256(N, S []byte) *SHAKE {
if len(N) == 0 && len(S) == 0 {
return NewSHAKE256()
}
return nil
}

Expand Down

0 comments on commit 1592b8e

Please sign in to comment.