C# Class Crypto, gracenode

Summary description for crypto
Mostra file Open project: voltrue2/gracenode Class Usage Examples

Private Properties

Property Type Description
ByteEqual bool
ByteSlice byte[]
Ctr void
TransposeGuidBytes byte[]
_ByteSlice byte[]
_Ctr void
_TransposeGuidBytes byte[]

Public Methods

Method Description
Crypto ( Guid sessionId, byte cipherKey, byte cipherNonce, byte macKey ) : System
Decrypt ( byte payload ) : byte[]
Encrypt ( byte payload ) : byte[]

Private Methods

Method Description
ByteEqual ( byte a, byte b ) : bool
ByteSlice ( byte source, int start, int end ) : byte[]
Ctr ( uint seq, byte inBytes, byte outBytes, int offset ) : void
TransposeGuidBytes ( byte buffIn ) : byte[]
_ByteSlice ( byte source, int start, int end ) : byte[]
_Ctr ( uint seq, byte inBytes, byte outBytes, int offset ) : void
_TransposeGuidBytes ( byte buffIn ) : byte[]

Method Details

Crypto() public method

public Crypto ( Guid sessionId, byte cipherKey, byte cipherNonce, byte macKey ) : System
sessionId Guid
cipherKey byte
cipherNonce byte
macKey byte
return System

Decrypt() public method

public Decrypt ( byte payload ) : byte[]
payload byte
return byte[]

Encrypt() public method

public Encrypt ( byte payload ) : byte[]
payload byte
return byte[]