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

Implements the Diffie-Hellman algorithm.
상속: DiffieHellman
파일 보기 프로젝트 열기: ElanHasson/SSIS-Extensions 1 사용 예제들

공개 메소드들

메소드 설명
CreateKeyExchange ( ) : byte[]

Creates the key exchange data.

DecryptKeyExchange ( byte keyEx ) : byte[]

Extracts secret information from the key exchange data.

DiffieHellmanManaged ( ) : System

Initializes a new DiffieHellmanManaged instance.

The default length of the shared secret is 1024 bits.

DiffieHellmanManaged ( byte p, byte g, byte x ) : System

Initializes a new DiffieHellmanManaged instance.

DiffieHellmanManaged ( byte p, byte g, int l ) : System

Initializes a new DiffieHellmanManaged instance.

DiffieHellmanManaged ( int bitlen, int l, DHKeyGeneration keygen ) : System

Initializes a new DiffieHellmanManaged instance.

The larger the bit length, the more secure the algorithm is. The default is 1024 bits. The minimum bit length is 128 bits.
The size of the private value will be one fourth of the bit length specified.

ExportParameters ( bool includePrivateParameters ) : DHParameters

Exports the DHParameters.

ImportParameters ( DHParameters parameters ) : void

Imports the specified DHParameters.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the SymmetricAlgorithm and optionally releases the managed resources.

비공개 메소드들

메소드 설명
GenerateKey ( int bitlen, DHKeyGeneration keygen, BigInteger &p, BigInteger &g ) : void
Initialize ( BigInteger p, BigInteger g, BigInteger x, int secretLen, bool checkInput ) : void

메소드 상세

CreateKeyExchange() 공개 메소드

Creates the key exchange data.
public CreateKeyExchange ( ) : byte[]
리턴 byte[]

DecryptKeyExchange() 공개 메소드

Extracts secret information from the key exchange data.
public DecryptKeyExchange ( byte keyEx ) : byte[]
keyEx byte The key exchange data within which the shared key is hidden.
리턴 byte[]

DiffieHellmanManaged() 공개 메소드

Initializes a new DiffieHellmanManaged instance.
The default length of the shared secret is 1024 bits.
public DiffieHellmanManaged ( ) : System
리턴 System

DiffieHellmanManaged() 공개 메소드

Initializes a new DiffieHellmanManaged instance.
or is a null reference (Nothing in Visual Basic). or is invalid.
public DiffieHellmanManaged ( byte p, byte g, byte x ) : System
p byte The P parameter of the Diffie-Hellman algorithm. This is a public parameter.
g byte The G parameter of the Diffie-Hellman algorithm. This is a public parameter.
x byte The X parameter of the Diffie-Hellman algorithm. This is a private parameter. If this parameters is a null reference (Nothing in Visual Basic), a secret value of the default size will be generated.
리턴 System

DiffieHellmanManaged() 공개 메소드

Initializes a new DiffieHellmanManaged instance.
or is a null reference (Nothing in Visual Basic). is invalid. or is invalid.
public DiffieHellmanManaged ( byte p, byte g, int l ) : System
p byte The P parameter of the Diffie-Hellman algorithm.
g byte The G parameter of the Diffie-Hellman algorithm.
l int The length, in bits, of the private value. If 0 is specified, the default value will be used.
리턴 System

DiffieHellmanManaged() 공개 메소드

Initializes a new DiffieHellmanManaged instance.
The larger the bit length, the more secure the algorithm is. The default is 1024 bits. The minimum bit length is 128 bits.
The size of the private value will be one fourth of the bit length specified.
The specified bit length is invalid.
public DiffieHellmanManaged ( int bitlen, int l, DHKeyGeneration keygen ) : System
bitlen int The length, in bits, of the public P parameter.
l int The length, in bits, of the secret value X. This parameter can be set to 0 to use the default size.
keygen DHKeyGeneration One of the values.
리턴 System

Dispose() 보호된 메소드

Releases the unmanaged resources used by the SymmetricAlgorithm and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

ExportParameters() 공개 메소드

Exports the DHParameters.
public ExportParameters ( bool includePrivateParameters ) : DHParameters
includePrivateParameters bool true to include private parameters; otherwise, false.
리턴 DHParameters

ImportParameters() 공개 메소드

Imports the specified DHParameters.
or is a null reference (Nothing in Visual Basic) -or- is not a prime number.
public ImportParameters ( DHParameters parameters ) : void
parameters DHParameters The parameters for .
리턴 void