nostr-gem/lib/nostr/errors/invalid_signature_length_error.rb
Wilson Silva 01010c763f
Allow the verification of signatures and events
Added the methods:
- Event#verify_signature
- Crypto#check_sig!
- Crypto#valid_sig?
- Crypto#sign_message

Fixed a primitive obsession by introducing a Signature class to ensure that signatures are valid Nostr signatures.
2024-03-15 19:13:33 +00:00

19 lines
396 B
Ruby

# frozen_string_literal: true
module Nostr
# Raised when the signature's length is not 128 characters
#
# @api public
#
class InvalidSignatureLengthError < SignatureValidationError
# Initializes the error
#
# @example
# InvalidSignatureLengthError.new
#
def initialize
super('Invalid signature length. It should have 128 characters.')
end
end
end