func Vrf(pri *ecdsa.PrivateKey, msg []byte) (vrf, nizk []byte, err error) {
	if err := checkPri(pri); err != nil {
		return nil, nil, errors.New("私钥不合法")
	}
	h := getHash(pri.Curve)
	if h == nil {
		return nil, nil, ErrKeyNotSupported
	}
	byteLen := (pri.Params().BitSize + 7) >> 3
	_, proof := Evaluate(pri, h, msg)
	if proof == nil {
		return nil, nil, ErrEvalVRF
	}

	nizk = proof[0 : 2*byteLen]
	vrf = proof[2*byteLen : 2*byteLen+2*byteLen+1]
	err = nil
	return
}
//Vrf returns the verifiable random function evaluated m and a NIZK proof
Vrf returns the verifiable random function evaluated m and a NIZK proof
// Vrf returns the verifiable random function evaluated m and a NIZK proof
func Vrf(pri *ecdsa.PrivateKey, msg []byte) (vrf, nizk []byte, err error) {
	if err := checkPri(pri); err != nil {
		return nil, nil, errors.New("私钥不合法")
	}
	h := getHash(pri.Curve)
	if h == nil {
		return nil, nil, ErrKeyNotSupported
	}
	byteLen := (pri.Params().BitSize + 7) >> 3
	_, proof := Evaluate(pri, h, msg)
	if proof == nil {
		return nil, nil, ErrEvalVRF
	}
	nizk = proof[0 : 2*byteLen]
	vrf = proof[2*byteLen : 2*byteLen+2*byteLen+1]
	err = nil
	return
}
func Vrf ( pri * ecdsa . PrivateKey , msg [ ] byte ) ( vrf , nizk [ ] byte , err error ) { if err := checkPri ( pri ) ; err != nil { return nil , nil , errors . New ( " } h := getHash ( pri . Curve ) if h == nil { return nil , nil , ErrKeyNotSupported } byteLen := ( pri . Params ( ) . BitSize + 7 ) >> 3 _ , proof := Evaluate ( pri , h , msg ) if proof == nil { return nil , nil , ErrEvalVRF } nizk = proof [ 0 : 2 * byteLen ] vrf = proof [ 2 * byteLen : 2 * byteLen + 2 * byteLen + 1 ] err = nil return }
Vrf returns the verifiable random function evaluated m and a NIZK proof
Vrf returns the verifiable random function evaluated m and a NIZK proof