struct

Beryl::Certificates::SignatureAlgorithm

Inherits Struct < Value < Object

A signature algorithm identifier (RFC 5280 §4.1.1.2) and what it means for verification.

Constructors

read(reader : Encoding::DER::Reader) : SignatureAlgorithm

Reads an AlgorithmIdentifier from reader.

Source

Instance methods

encoded

The whole AlgorithmIdentifier encoding, which RFC 5280 §4.1.1.2 requires to equal the one inside the signed part.

Source
hash_function
Source
identifier
Source
refused_hash_function_name

Returns "SHA-1" or "MD5" when this algorithm signs over that hash, which Beryl refuses whatever the key (RFC 9155 for SHA-1, RFC 6151 for MD5); nil for every other algorithm.

Source
scheme
Source
supported?
Source
verify(key : VerificationKey, message : Bytes, signature : Bytes) : Bool

Returns whether signature is this algorithm's signature of message under key. A key of the wrong type for the algorithm gives false.

Source

Nested types