Module: SshSig::Serializable

Included in:
Blob, Blob
Defined in:
lib/ssh_sig/serializable.rb

Constant Summary collapse

SIG_VERSION =
1
MAGIC_PREAMBLE =
"SSHSIG"
BEGIN_SIGNATURE =
"-----BEGIN SSH SIGNATURE-----"
END_SIGNATURE =
"-----END SSH SIGNATURE-----"
SIGALG_ALLOWED =
%w[ssh-ed25519 rsa-sha2-512 rsa-sha2-256].freeze
HASHALG_ALLOWED =
%w[sha512 sha256].freeze

Instance Method Summary collapse

Instance Method Details

#hash_algorithm_allowed?(alg) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/ssh_sig/serializable.rb', line 15

def hash_algorithm_allowed?(alg)
  HASHALG_ALLOWED.any?(alg)
end

#signature_algorithm_allowed?(alg) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/ssh_sig/serializable.rb', line 11

def signature_algorithm_allowed?(alg)
  SIGALG_ALLOWED.any?(alg)
end