mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-22 18:26:17 +08:00
15 lines
359 B
Go
15 lines
359 B
Go
// Copyright 2024 Sun Yimin. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build !purego
|
|
|
|
package sm3
|
|
|
|
func kdf(baseMD *digest, keyLen int, limit int) []byte {
|
|
if useSM3NI || limit < 4 {
|
|
return kdfGeneric(baseMD, keyLen, limit)
|
|
}
|
|
return kdfBy4(baseMD, keyLen, limit)
|
|
}
|