22 lines
577 B
PHP
22 lines
577 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Contractless\Rpc\Crypto;
|
|
|
|
interface CryptoInterface
|
|
{
|
|
/** Return the raw 32-byte Skein-256 digest. */
|
|
public function skein256(string $message): string;
|
|
|
|
/** Sign raw Contractless message bytes and return a 666-byte signature. */
|
|
public function sign(string $message, string $privateKey, string $publicKey): string;
|
|
|
|
/** Verify raw Contractless message bytes against a 666-byte signature. */
|
|
public function verify(
|
|
string $message,
|
|
string $signature,
|
|
string $publicKey,
|
|
): bool;
|
|
}
|