Exception: Nostr::InvalidKeyLengthError

Inherits:
KeyValidationError show all
Defined in:
lib/nostr/errors/invalid_key_length_error.rb

Overview

Raised when the private key’s length is not 64 characters

Instance Method Summary collapse

Constructor Details

#initialize(key_kind) ⇒ InvalidKeyLengthError

Initializes the error

Examples:

InvalidKeyLengthError.new('private')

Parameters:

  • key_kind (String)

    The kind of key that is invalid (public or private)



16
17
18
# File 'lib/nostr/errors/invalid_key_length_error.rb', line 16

def initialize(key_kind)
  super("Invalid #{key_kind} key length. It should have 64 characters.")
end