C# Class Brunet.Security.PeerSec.SecurityControlMessage

Parses and creates SecurityControlMessages. In general, this class is not thread-safe.
The format for said packets is: [version][security params][message type][cookie local][cookie remote] [dhe length][dhe][cert length][cert][cas length][cas][signature] version, type, data length are integers the cookie and id sizes are static in a given environment the signature is static based upon the signature type
Datei anzeigen Open project: pstjuste/brunet Class Usage Examples

Public Properties

Property Type Description
CALength int
CookieLength int
EmptyCookie MemBlock

Protected Properties

Property Type Description
_cas List
_certificate MemBlock
_dhe MemBlock
_hash MemBlock
_local_cookie MemBlock
_packet MemBlock
_remote_cookie MemBlock
_signature MemBlock
_spi int
_type MessageType
_update_packet bool
_version int

Public Methods

Method Description
SecurityControlMessage ( MemBlock data ) : Brunet
Sign ( RSACryptoServiceProvider rsa, HashAlgorithm hash ) : void

Signs a packet given a RSA key and a Hash algorithm.

ToString ( ) : string
Verify ( RSACryptoServiceProvider rsa, HashAlgorithm hash ) : bool

Verifies the packet given a RSA key and a Hash algorithm.

Protected Methods

Method Description
UpdatePacket ( ) : void

Writes the packet.

Private Methods

Method Description
SecurityControlMessage ( ) : Brunet

Method Details

SecurityControlMessage() public method

public SecurityControlMessage ( MemBlock data ) : Brunet
data MemBlock
return Brunet

Sign() public method

Signs a packet given a RSA key and a Hash algorithm.
public Sign ( RSACryptoServiceProvider rsa, HashAlgorithm hash ) : void
rsa System.Security.Cryptography.RSACryptoServiceProvider
hash System.Security.Cryptography.HashAlgorithm
return void

ToString() public method

public ToString ( ) : string
return string

UpdatePacket() protected method

Writes the packet.
protected UpdatePacket ( ) : void
return void

Verify() public method

Verifies the packet given a RSA key and a Hash algorithm.
public Verify ( RSACryptoServiceProvider rsa, HashAlgorithm hash ) : bool
rsa System.Security.Cryptography.RSACryptoServiceProvider
hash System.Security.Cryptography.HashAlgorithm
return bool

Property Details

CALength public_oe static_oe property

public static int CALength
return int

CookieLength public_oe static_oe property

public static int CookieLength
return int

EmptyCookie public_oe static_oe property

public static MemBlock EmptyCookie
return MemBlock

_cas protected_oe property

protected List _cas
return List

_certificate protected_oe property

protected MemBlock _certificate
return MemBlock

_dhe protected_oe property

protected MemBlock _dhe
return MemBlock

_hash protected_oe property

protected MemBlock _hash
return MemBlock

_local_cookie protected_oe property

protected MemBlock _local_cookie
return MemBlock

_packet protected_oe property

protected MemBlock _packet
return MemBlock

_remote_cookie protected_oe property

protected MemBlock _remote_cookie
return MemBlock

_signature protected_oe property

protected MemBlock _signature
return MemBlock

_spi protected_oe property

protected int _spi
return int

_type protected_oe property

protected MessageType _type
return MessageType

_update_packet protected_oe property

protected bool _update_packet
return bool

_version protected_oe property

protected int _version
return int