API / Minn\Support / Signatures

Signatures final class

Minn\Support\Signatures · public/minn/src/Minn/Support/Signatures.php · 34 lines

A file checked against detached Ed25519 signatures of its SHA-384 hash, as verify_file_signature checks it: a signature that does not decode to the signature length is skipped, and for each one that does, every key that does not decode to the key length is skipped too; the counts and the hash are what the caller reports when nothing verifies.

Public

staticcheck(string $file, array $signatures, array $keys): array#

Whether any signature verifies with any key, the file's hash in hex, and how many keys and signatures were skipped.

$signatureslist<mixed>
$keyslist<mixed>base64 public keys
@return array{verified: bool, hash: string, skipped_key: int, skipped_sig: int}