C# Class Brunet.Security.SecurityDataMessage

Parses and creates SecurityDataMessages. In general this class is not thread-safe.
The format for said packets is: [security params][epoch][seqid][encrypted [data length][data][signature]]
Inheritance: DataPacket
Afficher le fichier Open project: johnynek/brunet Class Usage Examples

Protected Properties

Свойство Type Description
_data MemBlock
_encrypted_data MemBlock
_epoch int
_seqid int
_signature MemBlock
_spi int

Méthodes publiques

Méthode Description
Decrypt ( SymmetricEncryption se ) : bool

Decrypts the packet given a SymmetricEncryption returning true if it was able to decrypt it.

Encrypt ( SymmetricEncryption se ) : void

Encrypts the packet given a SymmetricEncryption.

SecurityDataMessage ( ) : Brunet
SecurityDataMessage ( MemBlock data ) : Brunet
Sign ( HashAlgorithm hash ) : void

Signs a packet given a Hash algorithm.

Verify ( HashAlgorithm hash ) : bool

Verifies the packet given a Hash algorithm.

Méthodes protégées

Méthode Description
UpdatePacket ( ) : void

Method Details

Decrypt() public méthode

Decrypts the packet given a SymmetricEncryption returning true if it was able to decrypt it.
public Decrypt ( SymmetricEncryption se ) : bool
se SymmetricEncryption
Résultat bool

Encrypt() public méthode

Encrypts the packet given a SymmetricEncryption.
public Encrypt ( SymmetricEncryption se ) : void
se SymmetricEncryption
Résultat void

SecurityDataMessage() public méthode

public SecurityDataMessage ( ) : Brunet
Résultat Brunet

SecurityDataMessage() public méthode

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

Sign() public méthode

Signs a packet given a Hash algorithm.
public Sign ( HashAlgorithm hash ) : void
hash System.Security.Cryptography.HashAlgorithm
Résultat void

UpdatePacket() protected méthode

protected UpdatePacket ( ) : void
Résultat void

Verify() public méthode

Verifies the packet given a Hash algorithm.
public Verify ( HashAlgorithm hash ) : bool
hash System.Security.Cryptography.HashAlgorithm
Résultat bool

Property Details

_data protected_oe property

protected MemBlock _data
Résultat MemBlock

_encrypted_data protected_oe property

protected MemBlock _encrypted_data
Résultat MemBlock

_epoch protected_oe property

protected int _epoch
Résultat int

_seqid protected_oe property

protected int _seqid
Résultat int

_signature protected_oe property

protected MemBlock _signature
Résultat MemBlock

_spi protected_oe property

protected int _spi
Résultat int