func validateSignature(signature string, message []byte, pubKey string) error {
	sigBytes, err := hexutil.Decode(utils.FormatHexString(signature))
	if err != nil {
		return InvalidCredentialError{fmt.Sprintf("unable to decode signature: %s", err.Error())}
	}

	key, err := hexutil.Decode(utils.FormatHexString(pubKey))
	if err != nil {
		return InvalidCredentialError{fmt.Sprintf("unable to decode publickey: %s", err.Error())}
	}

	if !secp256k1.VerifySignature(key, message, sigBytes) {
		return InvalidRequestSignatureError{"invalid Signature"}
	}
	return nil
}
// Verifies  that the given pubkey created signature over message.
Verifies  that the given pubkey created signature over message.
// Verifies that the given pubkey created signature over message .
func validateSignature(signature string, message []byte, pubKey string) error {
	sigBytes, err := hexutil.Decode(utils.FormatHexString(signature))
	if err != nil {
		return InvalidCredentialError{fmt.Sprintf("unable to decode signature: %s", err.Error())}
	}
	key, err := hexutil.Decode(utils.FormatHexString(pubKey))
	if err != nil {
		return InvalidCredentialError{fmt.Sprintf("unable to decode publickey: %s", err.Error())}
	}
	if !secp256k1.VerifySignature(key, message, sigBytes) {
		return InvalidRequestSignatureError{"invalid Signature"}
	}
	return nil
}
func validateSignature ( signature string , message [ ] byte , pubKey string ) error { sigBytes , err := hexutil . Decode ( utils . FormatHexString ( signature ) ) if err != nil { return InvalidCredentialError { fmt . Sprintf ( " " , err . Error ( ) ) } } key , err := hexutil . Decode ( utils . FormatHexString ( pubKey ) ) if err != nil { return InvalidCredentialError { fmt . Sprintf ( " " , err . Error ( ) ) } } if ! secp256k1 . VerifySignature ( key , message , sigBytes ) { return InvalidRequestSignatureError { " " } } return nil }
Verifies  that the given pubkey created signature over message.
Verifies that the given pubkey created signature over message .