class Crypto::SSHKey

Defined in:

crypto/pubkey/ssh_key.cr

Constant Summary

SSH2_LINE_LENGTH = 70
SSH_CONVERSION = {"rsa" => ["e", "n"], "dsa" => ["p", "q", "g", "pub_key"]}
SSH_TYPES = {"ssh-rsa" => "rsa", "ssh-dss" => "dsa", "ssh-ed25519" => "ed25519", "ecdsa-sha2-nistp256" => "ecdsa", "ecdsa-sha2-nistp384" => "ecdsa", "ecdsa-sha2-nistp521" => "ecdsa"}
SSHFP_TYPES = {"rsa" => 1, "dsa" => 2, "ecdsa" => 3, "ed25519" => 4}

Constructors

Instance Method Summary

Constructor Detail

def self.new(private_key : PrivateKey, passphrase : String | Nil = nil, comment : String | Nil = nil, directives : Array(String) | Nil = nil) #

[View source]

Instance Method Detail

def comment : String #

Comment to use for the public key


[View source]
def comment=(comment : String) #

Comment to use for the public key


[View source]
def directives : Array(String) #

Options prefixed to the public key


[View source]
def directives=(directives : Array(String)) #

Options prefixed to the public key


[View source]
def passphrase : String | Nil #

If the key is encrypted, supply the passphrase


[View source]
def passphrase=(passphrase : String | Nil) #

If the key is encrypted, supply the passphrase


[View source]