C# 클래스 System.Security.Cryptography.DSACryptoServiceProvider

상속: DSA, ICspAsymmetricAlgorithm
파일 보기 프로젝트 열기: dotnet/corefx 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AcquireSafeProviderHandle System.Security.Cryptography.SafeProvHandle
DSACryptoServiceProvider System.Diagnostics
IsPublic bool

공개 메소드들

메소드 설명
CreateSignature ( byte rgbHash ) : byte[]

Creates the DSA signature for the specified data.

DSACryptoServiceProvider ( ) : System.Diagnostics

Initializes a new instance of the DSACryptoServiceProvider class.

DSACryptoServiceProvider ( CspParameters parameters ) : System.Diagnostics

Initializes a new instance of the DSACryptoServiceProvider class with the specified parameters for the cryptographic service provider (CSP).

DSACryptoServiceProvider ( int dwKeySize ) : System.Diagnostics

Initializes a new instance of the DSACryptoServiceProvider class with the specified key size.

ExportCspBlob ( bool includePrivateParameters ) : byte[]

Exports a blob containing the key information associated with an DSACryptoServiceProvider object.

ExportParameters ( bool includePrivateParameters ) : DSAParameters
ImportCspBlob ( byte keyBlob ) : void

Imports a blob that represents DSA key information.

ImportParameters ( DSAParameters parameters ) : void
SignData ( Stream inputStream ) : byte[]

Computes the hash value of the specified input stream and signs the resulting hash value.

SignData ( byte buffer ) : byte[]

Computes the hash value of the specified input stream and signs the resulting hash value.

SignData ( byte buffer, int offset, int count ) : byte[]

Signs a byte array from the specified start point to the specified end point.

SignHash ( byte rgbHash, string str ) : byte[]

Computes the signature for the specified hash value by encrypting it with the private key.

VerifyData ( byte rgbData, byte rgbSignature ) : bool

Verifies the specified signature data by comparing it to the signature computed for the specified data.

VerifyHash ( byte rgbHash, string str, byte rgbSignature ) : bool

Verifies the specified signature data by comparing it to the signature computed for the specified hash value.

VerifySignature ( byte rgbHash, byte rgbSignature ) : bool

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void
HashData ( Stream data, HashAlgorithmName hashAlgorithm ) : byte[]
HashData ( byte data, int offset, int count, HashAlgorithmName hashAlgorithm ) : byte[]

비공개 메소드들

메소드 설명
AcquireSafeProviderHandle ( ) : System.Security.Cryptography.SafeProvHandle

This method helps Acquire the default CSP and avoids the need for static SafeProvHandle in CapiHelper class

DSACryptoServiceProvider ( int dwKeySize, CspParameters parameters ) : System.Diagnostics
IsPublic ( byte keyBlob ) : bool

Find whether a DSS key blob is public.

메소드 상세

CreateSignature() 공개 메소드

Creates the DSA signature for the specified data.
public CreateSignature ( byte rgbHash ) : byte[]
rgbHash byte The data to be signed.
리턴 byte[]

DSACryptoServiceProvider() 공개 메소드

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

DSACryptoServiceProvider() 공개 메소드

Initializes a new instance of the DSACryptoServiceProvider class with the specified parameters for the cryptographic service provider (CSP).
public DSACryptoServiceProvider ( CspParameters parameters ) : System.Diagnostics
parameters CspParameters The parameters for the CSP.
리턴 System.Diagnostics

DSACryptoServiceProvider() 공개 메소드

Initializes a new instance of the DSACryptoServiceProvider class with the specified key size.
public DSACryptoServiceProvider ( int dwKeySize ) : System.Diagnostics
dwKeySize int The size of the key for the asymmetric algorithm in bits.
리턴 System.Diagnostics

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

ExportCspBlob() 공개 메소드

Exports a blob containing the key information associated with an DSACryptoServiceProvider object.
public ExportCspBlob ( bool includePrivateParameters ) : byte[]
includePrivateParameters bool
리턴 byte[]

ExportParameters() 공개 메소드

public ExportParameters ( bool includePrivateParameters ) : DSAParameters
includePrivateParameters bool
리턴 DSAParameters

HashData() 보호된 메소드

protected HashData ( Stream data, HashAlgorithmName hashAlgorithm ) : byte[]
data Stream
hashAlgorithm HashAlgorithmName
리턴 byte[]

HashData() 보호된 메소드

protected HashData ( byte data, int offset, int count, HashAlgorithmName hashAlgorithm ) : byte[]
data byte
offset int
count int
hashAlgorithm HashAlgorithmName
리턴 byte[]

ImportCspBlob() 공개 메소드

Imports a blob that represents DSA key information.
public ImportCspBlob ( byte keyBlob ) : void
keyBlob byte A byte array that represents a DSA key blob.
리턴 void

ImportParameters() 공개 메소드

public ImportParameters ( DSAParameters parameters ) : void
parameters DSAParameters
리턴 void

SignData() 공개 메소드

Computes the hash value of the specified input stream and signs the resulting hash value.
public SignData ( Stream inputStream ) : byte[]
inputStream Stream The input data for which to compute the hash.
리턴 byte[]

SignData() 공개 메소드

Computes the hash value of the specified input stream and signs the resulting hash value.
public SignData ( byte buffer ) : byte[]
buffer byte The input data for which to compute the hash.
리턴 byte[]

SignData() 공개 메소드

Signs a byte array from the specified start point to the specified end point.
public SignData ( byte buffer, int offset, int count ) : byte[]
buffer byte The input data to sign.
offset int The offset into the array from which to begin using data.
count int The number of bytes in the array to use as data.
리턴 byte[]

SignHash() 공개 메소드

Computes the signature for the specified hash value by encrypting it with the private key.
public SignHash ( byte rgbHash, string str ) : byte[]
rgbHash byte The hash value of the data to be signed.
str string The name of the hash algorithm used to create the hash value of the data.
리턴 byte[]

VerifyData() 공개 메소드

Verifies the specified signature data by comparing it to the signature computed for the specified data.
public VerifyData ( byte rgbData, byte rgbSignature ) : bool
rgbData byte The data that was signed.
rgbSignature byte The signature data to be verified.
리턴 bool

VerifyHash() 공개 메소드

Verifies the specified signature data by comparing it to the signature computed for the specified hash value.
public VerifyHash ( byte rgbHash, string str, byte rgbSignature ) : bool
rgbHash byte The hash value of the data to be signed.
str string The name of the hash algorithm used to create the hash value of the data.
rgbSignature byte The signature data to be verified.
리턴 bool

VerifySignature() 공개 메소드

public VerifySignature ( byte rgbHash, byte rgbSignature ) : bool
rgbHash byte
rgbSignature byte
리턴 bool