Interface ICryptoEncryptor
Defines methods for encrypting and decrypting network packets.
Namespace: SuperNet.Netcode.Crypto
Assembly: cs.temp.dll.dll
Syntax
public interface ICryptoEncryptor : IDisposable
Methods
Decrypt(ArraySegment<Byte>, Byte[], Int32)
Decrypt data.
Declaration
int Decrypt(ArraySegment<byte> input, byte[] output, int offset)
Parameters
Type | Name | Description |
---|---|---|
Array |
input | Array segment to decrypt. |
System. |
output | Output buffer to write to. |
System. |
offset | Output offset to write to. |
Returns
Type | Description |
---|---|
System. |
Total number of bytes written to the output. |
Encrypt(ArraySegment<Byte>, Byte[], Int32)
Encrypt data.
Declaration
int Encrypt(ArraySegment<byte> input, byte[] output, int offset)
Parameters
Type | Name | Description |
---|---|---|
Array |
input | Array segment to encrypt. |
System. |
output | Output buffer to write to. |
System. |
offset | Output offset to write to. |
Returns
Type | Description |
---|---|
System. |
Total number of bytes written to the output. |
MaxDecryptedLength(Int32)
Compute the maximum decrypted length before decrypting.
Declaration
int MaxDecryptedLength(int inputLength)
Parameters
Type | Name | Description |
---|---|---|
System. |
inputLength | Length of the input that is about to be decrypted. |
Returns
Type | Description |
---|---|
System. |
Maximum possible decrypted length. |
MaxEncryptedLength(Int32)
Compute the maximum encrypted length before encrypting.
Declaration
int MaxEncryptedLength(int inputLength)
Parameters
Type | Name | Description |
---|---|---|
System. |
inputLength | Length of the input that is about to be encrypted. |
Returns
Type | Description |
---|---|
System. |
Maximum possible encrypted length. |