verifySignature()

Verify a signature with a public key

Method signature

private function verifySignature($publicKey, $message, $signature)

Parameters

Name
Type
Description

publicKey

string

Public key in hexadecimal format.

message

string

Message that you want to verify

signature

string

Signature that you want to compare

Example

<?php
require 'vendor/autoload.php';
use CircularProtocol\Api\CircularProtocolAPI;

$circular = new CircularProtocolAPI();
$publicKey = "0x04b5aa6be8b2e3420fb5a8b22e80e64ace8271d88dc4c081436956b0848e7bcf4e864b35c59e218885ed3d839352b81f85872c9460732ca05b8c18dad29dbad00e";
$signature = "0xaf14525076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd9450837ab";
$message = "Hello, World!";

$result = $circular->verifySignature($publicKey, $message, $signature);
echo $result;

Result

The result will be a boolean object.

true

Last updated