github.com/stafiprotocol/go-substrate-rpc-client@v1.4.7/pkg/utils/blake2.go (about)

     1  package utils
     2  
     3  import (
     4  	"math/big"
     5  
     6  	"golang.org/x/crypto/blake2b"
     7  )
     8  
     9  func BlakeTwo256(dest []byte) [32]byte {
    10  	return blake2b.Sum256(dest)
    11  }
    12  
    13  const Base = 10
    14  
    15  func StringToBigint(src string) (*big.Int, bool) {
    16  	return big.NewInt(0).SetString(src, Base)
    17  }