Photon Server API
Public Member Functions | Properties | List of all members
Photon.SocketServer.Security.RijndaelCryptoProvider Class Reference

An ICryptoProvider implementation using the Rijndael symmetric encryption algorithm. More...

Inheritance diagram for Photon.SocketServer.Security.RijndaelCryptoProvider:
Photon.SocketServer.Security.ICryptoProvider

Public Member Functions

 RijndaelCryptoProvider (byte[] secretKey)
 Initializes a new instance of the RijndaelCryptoProvider class. More...
 
 RijndaelCryptoProvider (byte[] secretKey, PaddingMode paddingMode)
 Initializes a new instance of the RijndaelCryptoProvider class. More...
 
byte[] Decrypt (byte[] data)
 Decrypts the data . More...
 
byte[] Decrypt (byte[] data, int offset, int count)
 Decrypts the data . More...
 
byte[] Encrypt (byte[] data)
 Encrypts the data . More...
 
byte[] Encrypt (byte[] data, int offset, int count)
 Encrypts the data . More...
 

Properties

bool IsInitialized [get]
 Gets a value indicating whether IsInitialized. More...
 
PaddingMode Padding [get]
 Gets the padding mode used in the symmetric algorithm. The default is PaddingMode.PKCS7 More...
 
- Properties inherited from Photon.SocketServer.Security.ICryptoProvider
bool IsInitialized [get]
 Gets a value indicating whether IsInitialized. More...
 

Detailed Description

An ICryptoProvider implementation using the Rijndael symmetric encryption algorithm.

Constructor & Destructor Documentation

Photon.SocketServer.Security.RijndaelCryptoProvider.RijndaelCryptoProvider ( byte[]  secretKey)
inline

Initializes a new instance of the RijndaelCryptoProvider class.

Parameters
secretKeyThe secret key for the symmetric algorithm. This algorithm supports key lengths of 128, 192, or 256 bits (16, 24 or 32 bytes).
Exceptions
CryptographicExceptionThe key size is invalid. This algorithm supports key lengths of 128, 192, or 256 bits (16, 24 or 32 bytes).

The secret key is used both for encryption and for decryption. For a symmetric algorithm to be successful, the secret key must be known only to the sender and the receiver.

Photon.SocketServer.Security.RijndaelCryptoProvider.RijndaelCryptoProvider ( byte[]  secretKey,
PaddingMode  paddingMode 
)
inline

Initializes a new instance of the RijndaelCryptoProvider class.

Parameters
secretKeyThe secret key for the symmetric algorithm. This algorithm supports key lengths of 128, 192, or 256 bits.
paddingModeThe padding mode.
Exceptions
CryptographicExceptionThe key size is invalid. This algorithm supports key lengths of 128, 192, or 256 bits (16, 24 or 32 bytes).

The secret key is used both for encryption and for decryption. For a symmetric algorithm to be successful, the secret key must be known only to the sender and the receiver.

Member Function Documentation

byte [] Photon.SocketServer.Security.RijndaelCryptoProvider.Decrypt ( byte[]  data)
inline

Decrypts the data .

Parameters
dataThe data.
Returns
The decrypted data.

Implements Photon.SocketServer.Security.ICryptoProvider.

byte [] Photon.SocketServer.Security.RijndaelCryptoProvider.Decrypt ( byte[]  data,
int  offset,
int  count 
)
inline

Decrypts the data .

Parameters
dataThe data.
offsetThe offset.
countThe count.
Returns
The decrypted data.

Implements Photon.SocketServer.Security.ICryptoProvider.

byte [] Photon.SocketServer.Security.RijndaelCryptoProvider.Encrypt ( byte[]  data)
inline

Encrypts the data .

Parameters
dataThe data to encrypt.
Returns
The encrypted data.

Implements Photon.SocketServer.Security.ICryptoProvider.

byte [] Photon.SocketServer.Security.RijndaelCryptoProvider.Encrypt ( byte[]  data,
int  offset,
int  count 
)
inline

Encrypts the data .

Parameters
dataThe data.
offsetThe offset.
countThe count.
Returns
The encrypted data.

Implements Photon.SocketServer.Security.ICryptoProvider.

Property Documentation

bool Photon.SocketServer.Security.RijndaelCryptoProvider.IsInitialized
get

Gets a value indicating whether IsInitialized.

PaddingMode Photon.SocketServer.Security.RijndaelCryptoProvider.Padding
get

Gets the padding mode used in the symmetric algorithm. The default is PaddingMode.PKCS7

The padding.