C# Class Tamir.SharpSsh.jsch.KeyPair

显示文件 Open project: soywiz/csharputils Class Usage Examples

Public Methods

Method Description
KeyPair ( JSch jsch ) : System
decrypt ( String _passphrase ) : bool
dispose ( ) : void
genKeyPair ( JSch jsch, int type ) : KeyPair
genKeyPair ( JSch jsch, int type, int key_size ) : KeyPair
getFingerPrint ( ) : String
getKeySize ( ) : int
getKeyType ( ) : int
getPublicKeyBlob ( ) : byte[]
isEncrypted ( ) : bool
load ( JSch jsch, String prvkey ) : KeyPair
load ( JSch jsch, String prvkey, String pubkey ) : KeyPair
setPassphrase ( String passphrase ) : void
setPassphrase ( byte passphrase ) : void
writePrivateKey ( Stream outs ) : void
writePrivateKey ( String name ) : void
writePublicKey ( Stream outs, String comment ) : void
writePublicKey ( String name, String comment ) : void
writeSECSHPublicKey ( Stream outs, String comment ) : void
writeSECSHPublicKey ( String name, String comment ) : void

Private Methods

Method Description
Write ( Stream s, byte arr ) : void
a2b ( byte c ) : byte
b2a ( byte c ) : byte
countLength ( int len ) : int
decrypt ( byte data, byte passphrase, byte iv ) : byte[]
encrypt ( byte plain, byte _iv ) : byte[]
genCipher ( ) : Tamir.SharpSsh.jsch.Cipher
genHash ( ) : Tamir.SharpSsh.jsch.HASH
genKey ( byte passphrase, byte iv ) : byte[]
genRandom ( ) : Random
generate ( int key_size ) : void
getBegin ( ) : byte[]
getEnd ( ) : byte[]
getKeyTypeName ( ) : byte[]
getPrivateKey ( ) : byte[]
parse ( byte data ) : bool
writeINTEGER ( byte buf, int index, byte data ) : int
writeLength ( byte data, int index, int len ) : int
writeSEQUENCE ( byte buf, int index, int len ) : int

Method Details

KeyPair() public method

public KeyPair ( JSch jsch ) : System
jsch JSch
return System

decrypt() public method

public decrypt ( String _passphrase ) : bool
_passphrase String
return bool

dispose() public method

public dispose ( ) : void
return void

genKeyPair() public static method

public static genKeyPair ( JSch jsch, int type ) : KeyPair
jsch JSch
type int
return KeyPair

genKeyPair() public static method

public static genKeyPair ( JSch jsch, int type, int key_size ) : KeyPair
jsch JSch
type int
key_size int
return KeyPair

getFingerPrint() public method

public getFingerPrint ( ) : String
return String

getKeySize() public abstract method

public abstract getKeySize ( ) : int
return int

getKeyType() public abstract method

public abstract getKeyType ( ) : int
return int

getPublicKeyBlob() public method

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

isEncrypted() public method

public isEncrypted ( ) : bool
return bool

load() public static method

public static load ( JSch jsch, String prvkey ) : KeyPair
jsch JSch
prvkey String
return KeyPair

load() public static method

public static load ( JSch jsch, String prvkey, String pubkey ) : KeyPair
jsch JSch
prvkey String
pubkey String
return KeyPair

setPassphrase() public method

public setPassphrase ( String passphrase ) : void
passphrase String
return void

setPassphrase() public method

public setPassphrase ( byte passphrase ) : void
passphrase byte
return void

writePrivateKey() public method

public writePrivateKey ( Stream outs ) : void
outs Stream
return void

writePrivateKey() public method

public writePrivateKey ( String name ) : void
name String
return void

writePublicKey() public method

public writePublicKey ( Stream outs, String comment ) : void
outs Stream
comment String
return void

writePublicKey() public method

public writePublicKey ( String name, String comment ) : void
name String
comment String
return void

writeSECSHPublicKey() public method

public writeSECSHPublicKey ( Stream outs, String comment ) : void
outs Stream
comment String
return void

writeSECSHPublicKey() public method

public writeSECSHPublicKey ( String name, String comment ) : void
name String
comment String
return void