File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed
Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,9 @@ func SumSHAKE256(data []byte, length int) []byte {
5858 return out
5959}
6060
61- // SupportsSHAKE returns true if the SHAKE extendable output function with the
62- // given securityBits is supported.
61+ // SupportsSHAKE returns true if the SHAKE and CSHAKE extendable output functions
62+ // with the given securityBits are supported.
6363func SupportsSHAKE (securityBits int ) bool {
64- // CNG implements SHAKE using CSHAKE with empty N and S.
65- return SupportsCSHAKE (securityBits )
66- }
67-
68- // SupportsCSHAKE returns true if the CSHAKE extendable output function with the
69- // given securityBits is supported.
70- func SupportsCSHAKE (securityBits int ) bool {
7164 var id string
7265 switch securityBits {
7366 case 128 :
Original file line number Diff line number Diff line change @@ -34,14 +34,10 @@ var testShakes = map[string]struct {
3434func skipCSHAKEIfNotSupported (t * testing.T , algo string ) {
3535 var supported bool
3636 switch algo {
37- case "SHAKE128" :
37+ case "SHAKE128" , "CSHAKE128" :
3838 supported = cng .SupportsSHAKE (128 )
39- case "SHAKE256" :
39+ case "SHAKE256" , "CSHAKE256" :
4040 supported = cng .SupportsSHAKE (256 )
41- case "CSHAKE128" :
42- supported = cng .SupportsCSHAKE (128 )
43- case "CSHAKE256" :
44- supported = cng .SupportsCSHAKE (256 )
4541 }
4642 if ! supported {
4743 t .Skip ("skipping: not supported" )
You can’t perform that action at this time.
0 commit comments