C# 클래스 Org.Mentalis.Security.Cryptography.RC4CryptoServiceProvider

Defines a wrapper object to access the cryptographic service provider (CSP) version of the RC4 algorithm. This class cannot be inherited.
상속: Org.Mentalis.Security.Cryptography.RC4
파일 보기 프로젝트 열기: soywiz/csharputils 1 사용 예제들

공개 메소드들

메소드 설명
CreateDecryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform

Creates a symmetric decryptor object with the specified Key.

This method decrypts an encrypted message created using the CreateEncryptor overload with the same parameters.

CreateEncryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform

Creates a symmetric encryptor object with the specified Key.

Use the CreateDecryptor overload with the same parameters to decrypt the result of this method.

GenerateIV ( ) : void

This is a stub method.

Since the RC4 cipher doesn't use an Initialization Vector, this method will not do anything.

GenerateKey ( ) : void

Generates a random Key to be used for the algorithm.

Use this method to generate a random key when none is specified.

RC4CryptoServiceProvider ( ) : System

Initializes a new instance of the RC4CryptoServiceProvider class.

비공개 메소드들

메소드 설명
CanUseUnmanaged ( int keySize ) : bool

Returns a boolean that indicates whether the unmanaged CSP can be used or not.

_Dispose ( ) : void

Releases all managed and unmanaged resources used by this class.

메소드 상세

CreateDecryptor() 공개 메소드

Creates a symmetric decryptor object with the specified Key.
This method decrypts an encrypted message created using the CreateEncryptor overload with the same parameters.
The object is disposed. is a null reference (Nothing in Visual Basic).
public CreateDecryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform
rgbKey byte The secret key to be used for the symmetric algorithm.
rgbIV byte Not used in RC4. It can be a null reference or a byte array with a length less than 2.
리턴 ICryptoTransform

CreateEncryptor() 공개 메소드

Creates a symmetric encryptor object with the specified Key.
Use the CreateDecryptor overload with the same parameters to decrypt the result of this method.
The object is disposed. is a null reference (Nothing in Visual Basic).
public CreateEncryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform
rgbKey byte The secret key to be used for the symmetric algorithm.
rgbIV byte Not used in RC4. It can be a null reference or a byte array with a length less than 2.
리턴 ICryptoTransform

GenerateIV() 공개 메소드

This is a stub method.
Since the RC4 cipher doesn't use an Initialization Vector, this method will not do anything.
public GenerateIV ( ) : void
리턴 void

GenerateKey() 공개 메소드

Generates a random Key to be used for the algorithm.
Use this method to generate a random key when none is specified.
public GenerateKey ( ) : void
리턴 void

RC4CryptoServiceProvider() 공개 메소드

Initializes a new instance of the RC4CryptoServiceProvider class.
public RC4CryptoServiceProvider ( ) : System
리턴 System