C# 클래스 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]]
상속: DataPacket
파일 보기 프로젝트 열기: johnynek/brunet 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_data MemBlock
_encrypted_data MemBlock
_epoch int
_seqid int
_signature MemBlock
_spi int

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
UpdatePacket ( ) : void

메소드 상세

Decrypt() 공개 메소드

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

Encrypt() 공개 메소드

Encrypts the packet given a SymmetricEncryption.
public Encrypt ( SymmetricEncryption se ) : void
se SymmetricEncryption
리턴 void

SecurityDataMessage() 공개 메소드

public SecurityDataMessage ( ) : Brunet
리턴 Brunet

SecurityDataMessage() 공개 메소드

public SecurityDataMessage ( MemBlock data ) : Brunet
data MemBlock
리턴 Brunet

Sign() 공개 메소드

Signs a packet given a Hash algorithm.
public Sign ( HashAlgorithm hash ) : void
hash System.Security.Cryptography.HashAlgorithm
리턴 void

UpdatePacket() 보호된 메소드

protected UpdatePacket ( ) : void
리턴 void

Verify() 공개 메소드

Verifies the packet given a Hash algorithm.
public Verify ( HashAlgorithm hash ) : bool
hash System.Security.Cryptography.HashAlgorithm
리턴 bool

프로퍼티 상세

_data 보호되어 있는 프로퍼티

protected MemBlock _data
리턴 MemBlock

_encrypted_data 보호되어 있는 프로퍼티

protected MemBlock _encrypted_data
리턴 MemBlock

_epoch 보호되어 있는 프로퍼티

protected int _epoch
리턴 int

_seqid 보호되어 있는 프로퍼티

protected int _seqid
리턴 int

_signature 보호되어 있는 프로퍼티

protected MemBlock _signature
리턴 MemBlock

_spi 보호되어 있는 프로퍼티

protected int _spi
리턴 int