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 |
---|---|---|
ArraySegment<System.Byte> | input | Array segment to decrypt. |
System.Byte[] | output | Output buffer to write to. |
System.Int32 | offset | Output offset to write to. |
Returns
Type | Description |
---|---|
System.Int32 | 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 |
---|---|---|
ArraySegment<System.Byte> | input | Array segment to encrypt. |
System.Byte[] | output | Output buffer to write to. |
System.Int32 | offset | Output offset to write to. |
Returns
Type | Description |
---|---|
System.Int32 | 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.Int32 | inputLength | Length of the input that is about to be decrypted. |
Returns
Type | Description |
---|---|
System.Int32 | Maximum possible decrypted length. |
MaxEncryptedLength(Int32)
Compute the maximum encrypted length before encrypting.
Declaration
int MaxEncryptedLength(int inputLength)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | inputLength | Length of the input that is about to be encrypted. |
Returns
Type | Description |
---|---|
System.Int32 | Maximum possible encrypted length. |