Implemenation of encryption for UDP trafic More...
Public Member Functions | |
void | Encrypt (byte[] data, int srcOffset, int len, byte[] output, ref int outputOffset) |
Encrypts data. puts them into output buffer and prepends with IV More... | |
void | Encrypt (byte[] data, int len, byte[] output, ref int offset) |
Encrypts data. puts them into output buffer and prepends with IV More... | |
byte[] | FinishHMAC (byte[] data, int offset, int count) |
Finishes current HMAC. can be used for HMAC calculation if all data are in same buffer More... | |
byte[] | FinishHMACThreadSafe (byte[] data, int offset, int count) |
Public Member Functions inherited from Photon.SocketServer.Security.CryptoBase | |
void | Init (byte[] encryptionSecret, byte[] hmacSecret) |
Initialize More... | |
void | Dispose () |
Static Public Member Functions | |
static int | EncryptedDataSize (int dataLen) |
static int | EncryptedDataSizeWithIV (int dataLen) |
Additional Inherited Members | |
Static Public Attributes inherited from Photon.SocketServer.Security.CryptoBase | |
const int | BLOCK_SIZE = 16 |
Defines block size for encryption/decryption algorithm More... | |
const int | IV_SIZE = BLOCK_SIZE |
Defines IV size for encryption/decryption algorithm More... | |
const int | HMAC_SIZE = 32 |
Defines HMAC size for packet authentication algorithm More... | |
Protected Attributes inherited from Photon.SocketServer.Security.CryptoBase | |
Aes | encryptor |
Encryption/decryption algorithm implementation More... | |
HMACSHA256 | hmacsha256 |
Packet authentication algorithm impelmenation More... | |
Implemenation of encryption for UDP trafic
|
inline |
Encrypts data. puts them into output buffer and prepends with IV
data | |
len | |
output | |
offset |
Thread safe. Can be used for inplace encryption
|
inline |
Encrypts data. puts them into output buffer and prepends with IV
data | incoming data |
srcOffset | offset from the begining |
len | length of data |
output | buffer where to put result |
outputOffset | offset in result buffer |
Thread safe. Can be used for inplace encryption
|
inlinestatic |
|
inlinestatic |
|
inline |
Finishes current HMAC. can be used for HMAC calculation if all data are in same buffer
data | buffer with data |
offset | offset in buffer |
count | count byte to use from buffer |
|
inline |