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.
19 lines
396 B
Ruby
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
|