C# Class System.Security.Cryptography.DSAImplementation.DSACng

Inheritance: DSA
ファイルを表示 Open project: dotnet/corefx

Public Methods

Method Description
CreateSignature ( byte rgbHash ) : byte[]
DSACng ( ) : Internal.Cryptography

Create a DSACng algorithm with a random 2048 bit key pair.

DSACng ( int keySize ) : Internal.Cryptography

Creates a new DSACng object that will use a randomly generated key of the specified size. Valid key sizes range from 512 to 3072 bits, in increments of 64. It's suggested that a minimum size of 2048 bits be used for all keys.

VerifySignature ( byte rgbHash, byte rgbSignature ) : bool

Protected Methods

Method Description
HashData ( Stream data, Internal.Cryptography.HashAlgorithmName hashAlgorithm ) : byte[]
HashData ( byte data, int offset, int count, Internal.Cryptography.HashAlgorithmName hashAlgorithm ) : byte[]

Private Methods

Method Description
AdjustHashSizeIfNecessary ( byte hash ) : byte[]
ComputeQLength ( ) : int
ExportKeyBlob ( bool includePrivateParameters ) : byte[]
ForceSetKeySize ( int newKeySize ) : void
GetDuplicatedKeyHandle ( ) : SafeNCryptKeyHandle
ImportKeyBlob ( byte rsaBlob, bool includePrivate ) : void
Supports2048KeySize ( ) : bool

Method Details

CreateSignature() public method

public CreateSignature ( byte rgbHash ) : byte[]
rgbHash byte
return byte[]

DSACng() public method

Create a DSACng algorithm with a random 2048 bit key pair.
public DSACng ( ) : Internal.Cryptography
return Internal.Cryptography

DSACng() public method

Creates a new DSACng object that will use a randomly generated key of the specified size. Valid key sizes range from 512 to 3072 bits, in increments of 64. It's suggested that a minimum size of 2048 bits be used for all keys.
if is not valid
public DSACng ( int keySize ) : Internal.Cryptography
keySize int Size of the key to generate, in bits.
return Internal.Cryptography

HashData() protected method

protected HashData ( Stream data, Internal.Cryptography.HashAlgorithmName hashAlgorithm ) : byte[]
data Stream
hashAlgorithm Internal.Cryptography.HashAlgorithmName
return byte[]

HashData() protected method

protected HashData ( byte data, int offset, int count, Internal.Cryptography.HashAlgorithmName hashAlgorithm ) : byte[]
data byte
offset int
count int
hashAlgorithm Internal.Cryptography.HashAlgorithmName
return byte[]

VerifySignature() public method

public VerifySignature ( byte rgbHash, byte rgbSignature ) : bool
rgbHash byte
rgbSignature byte
return bool