github.com/emmansun/gmsm@v0.29.1/sm3/kdf_s390x.go (about)

     1  // Copyright 2024 Sun Yimin. All rights reserved.
     2  // Use of this source code is governed by a MIT-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build !purego
     6  
     7  package sm3
     8  
     9  func kdf(baseMD *digest, keyLen int, limit int) []byte {
    10  	if limit < 4 {
    11  		return kdfGeneric(baseMD, keyLen, limit)
    12  	}
    13  
    14  	return kdfBy4(baseMD, keyLen, limit)
    15  }