C# Class RSA_PM_Client.DB

Mostra file Open project: RSA-PM/RSA-PM Class Usage Examples

Public Properties

Property Type Description
db DB
filename string
outbox List
pubkeys List

Public Methods

Method Description
DB ( ) : Mono.Data.Sqlite
GetInbox ( ) : RSA_PM_Client.Client.Message[]
GetName ( byte pubkey ) : string
GetOutbox ( ) : RSA_PM_Client.OutboxMsg[]
GetPrivateKeys ( ) : RSA_PM_Client.Private_Keys[]
GetPubKeys ( ) : RSA_PM_Client.Public_Keys[]
GetSettings ( ) : string>.Dictionary
GetStore ( Private_Keys prvkey ) : Action
Load ( RSAParameters rsap, byte pemdata ) : bool
Load ( string pw ) : bool
LoadInfo ( ) : byte[]>.Dictionary
SentMessage ( string their_name, byte their_pubkey, string txt, byte myprv, byte msgid, byte replyTo ) : long
Setup ( string pw, string pemfn, int pemopt, string sockproxy, int proxyport, string server_url, int server_port, byte server_pub, RSAParameters rsa_prv, bool useRsa ) : void
getMsgs ( long id ) : void
newprv ( byte prv, string name, Client client ) : bool
newpub ( byte pubkey, string name ) : long
renamePrv ( long id, string name ) : void

Private Methods

Method Description
ArrayrXor ( byte arr_orig, long v ) : byte[]
LoadAESKey ( string pw, byte pwaes ) : void
MakeConn ( ) : SqliteConnection
Store ( Client msg ) : void
dec ( byte buf_in, byte iv ) : byte[]
dec ( long v, byte iv ) : long
dec ( Info v ) : string
dec ( byte buf_in, string ivsz ) : string
dec_sz ( byte txt, byte iv ) : string
enc ( string>.KeyValuePair v ) : byte[]
enc ( byte data, byte iv ) : byte[]
enc ( string txt, byte iv ) : byte[]
enc ( string txt, string ivsz ) : byte[]
enc ( long v, byte iv ) : long

Method Details

DB() public method

public DB ( ) : Mono.Data.Sqlite
return Mono.Data.Sqlite

GetInbox() public method

public GetInbox ( ) : RSA_PM_Client.Client.Message[]
return RSA_PM_Client.Client.Message[]

GetName() public method

public GetName ( byte pubkey ) : string
pubkey byte
return string

GetOutbox() public method

public GetOutbox ( ) : RSA_PM_Client.OutboxMsg[]
return RSA_PM_Client.OutboxMsg[]

GetPrivateKeys() public method

public GetPrivateKeys ( ) : RSA_PM_Client.Private_Keys[]
return RSA_PM_Client.Private_Keys[]

GetPubKeys() public method

public GetPubKeys ( ) : RSA_PM_Client.Public_Keys[]
return RSA_PM_Client.Public_Keys[]

GetSettings() public method

public GetSettings ( ) : string>.Dictionary
return string>.Dictionary

GetStore() public method

public GetStore ( Private_Keys prvkey ) : Action
prvkey Private_Keys
return Action

Load() public method

public Load ( RSAParameters rsap, byte pemdata ) : bool
rsap System.Security.Cryptography.RSAParameters
pemdata byte
return bool

Load() public method

public Load ( string pw ) : bool
pw string
return bool

LoadInfo() public method

public LoadInfo ( ) : byte[]>.Dictionary
return byte[]>.Dictionary

SentMessage() public method

public SentMessage ( string their_name, byte their_pubkey, string txt, byte myprv, byte msgid, byte replyTo ) : long
their_name string
their_pubkey byte
txt string
myprv byte
msgid byte
replyTo byte
return long

Setup() public method

public Setup ( string pw, string pemfn, int pemopt, string sockproxy, int proxyport, string server_url, int server_port, byte server_pub, RSAParameters rsa_prv, bool useRsa ) : void
pw string
pemfn string
pemopt int
sockproxy string
proxyport int
server_url string
server_port int
server_pub byte
rsa_prv System.Security.Cryptography.RSAParameters
useRsa bool
return void

getMsgs() public method

public getMsgs ( long id ) : void
id long
return void

newprv() public method

public newprv ( byte prv, string name, Client client ) : bool
prv byte
name string
client Client
return bool

newpub() public method

public newpub ( byte pubkey, string name ) : long
pubkey byte
name string
return long

renamePrv() public method

public renamePrv ( long id, string name ) : void
id long
name string
return void

Property Details

db public_oe static_oe property

public static DB,RSA_PM_Client db
return DB

filename public_oe static_oe property

public static string filename
return string

outbox public_oe property

public List outbox
return List

pubkeys public_oe property

public List pubkeys
return List