C# Class Granados.SSH2.SSH2UserAuthKey

Show file Open project: poderosaproject/poderosa Class Usage Examples

Public Methods

Method Description
FromSECSHStyleFile ( string filename, string passphrase ) : SSH2UserAuthKey
FromSECSHStyleStream ( Stream strm, string passphrase ) : SSH2UserAuthKey
GetPublicKeyBlob ( ) : byte[]
PassphraseToKey ( string passphrase, int length ) : byte[]
SSH2UserAuthKey ( KeyPair kp ) : Granados.Poderosa.KeyFormat
SSH2UserAuthKey ( KeyPair kp, string comment ) : Granados.Poderosa.KeyFormat
Sign ( byte data ) : byte[]
WritePrivatePartInSECSHStyleFile ( Stream dest, string comment, string passphrase ) : void
WritePublicPartInOpenSSHStyle ( Stream dest ) : void
WritePublicPartInSECSHStyle ( Stream dest, string comment ) : void

Private Methods

Method Description
FormatBase64EncodedPublicKeyBody ( ) : string
WriteKeyFileBlock ( StreamWriter sw, string data, bool escape_needed ) : void

Method Details

FromSECSHStyleFile() public static method

public static FromSECSHStyleFile ( string filename, string passphrase ) : SSH2UserAuthKey
filename string
passphrase string
return SSH2UserAuthKey

FromSECSHStyleStream() public static method

public static FromSECSHStyleStream ( Stream strm, string passphrase ) : SSH2UserAuthKey
strm Stream
passphrase string
return SSH2UserAuthKey

GetPublicKeyBlob() public method

public GetPublicKeyBlob ( ) : byte[]
return byte[]

PassphraseToKey() public static method

public static PassphraseToKey ( string passphrase, int length ) : byte[]
passphrase string
length int
return byte[]

SSH2UserAuthKey() public method

public SSH2UserAuthKey ( KeyPair kp ) : Granados.Poderosa.KeyFormat
kp Granados.PKI.KeyPair
return Granados.Poderosa.KeyFormat

SSH2UserAuthKey() public method

public SSH2UserAuthKey ( KeyPair kp, string comment ) : Granados.Poderosa.KeyFormat
kp Granados.PKI.KeyPair
comment string
return Granados.Poderosa.KeyFormat

Sign() public method

public Sign ( byte data ) : byte[]
data byte
return byte[]

WritePrivatePartInSECSHStyleFile() public method

public WritePrivatePartInSECSHStyleFile ( Stream dest, string comment, string passphrase ) : void
dest Stream
comment string
passphrase string
return void

WritePublicPartInOpenSSHStyle() public method

public WritePublicPartInOpenSSHStyle ( Stream dest ) : void
dest Stream
return void

WritePublicPartInSECSHStyle() public method

public WritePublicPartInSECSHStyle ( Stream dest, string comment ) : void
dest Stream
comment string
return void