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
Afficher le fichier Open project: pstjuste/brunet Class Usage Examples

Méthodes publiques

Свойство Type Description
CALength int
CookieLength int
EmptyCookie MemBlock

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
UpdatePacket ( ) : void

Writes the packet.

Private Methods

Méthode Description
SecurityControlMessage ( ) : Brunet

Method Details

SecurityControlMessage() public méthode

public SecurityControlMessage ( MemBlock data ) : Brunet
data MemBlock
Résultat Brunet

Sign() public méthode

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
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

UpdatePacket() protected méthode

Writes the packet.
protected UpdatePacket ( ) : void
Résultat void

Verify() public méthode

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
Résultat bool

Property Details

CALength public_oe static_oe property

public static int CALength
Résultat int

CookieLength public_oe static_oe property

public static int CookieLength
Résultat int

EmptyCookie public_oe static_oe property

public static MemBlock EmptyCookie
Résultat MemBlock

_cas protected_oe property

protected List _cas
Résultat List

_certificate protected_oe property

protected MemBlock _certificate
Résultat MemBlock

_dhe protected_oe property

protected MemBlock _dhe
Résultat MemBlock

_hash protected_oe property

protected MemBlock _hash
Résultat MemBlock

_local_cookie protected_oe property

protected MemBlock _local_cookie
Résultat MemBlock

_packet protected_oe property

protected MemBlock _packet
Résultat MemBlock

_remote_cookie protected_oe property

protected MemBlock _remote_cookie
Résultat MemBlock

_signature protected_oe property

protected MemBlock _signature
Résultat MemBlock

_spi protected_oe property

protected int _spi
Résultat int

_type protected_oe property

protected MessageType _type
Résultat MessageType

_update_packet protected_oe property

protected bool _update_packet
Résultat bool

_version protected_oe property

protected int _version
Résultat int