Свойство | Тип | Описание | |
---|---|---|---|
AcquireSafeProviderHandle | System.Security.Cryptography.SafeProvHandle | ||
GetAlgorithmId | int | ||
GetHashAlgorithm | |||
HashAlgorithmNameNullOrEmpty | Exception | ||
IsPublic | bool | ||
IsPublic | bool | ||
PaddingModeNotSupported | Exception | ||
RSACryptoServiceProvider | System.Diagnostics | ||
SignHash | byte[] | ||
VerifyHash | bool |
Метод | Описание | |
---|---|---|
Decrypt ( byte data, RSAEncryptionPadding padding ) : byte[] | ||
Decrypt ( byte rgb, bool fOAEP ) : byte[] |
Decrypt raw data, generally used for decrypting symmetric key material
|
|
Encrypt ( byte data, RSAEncryptionPadding padding ) : byte[] | ||
Encrypt ( byte rgb, bool fOAEP ) : byte[] |
Encrypt raw data, generally used for encrypting symmetric key material. This method can only encrypt (keySize - 88 bits) of data, so should not be used for encrypting arbitrary byte arrays. Instead, encrypt a symmetric key with this method, and use the symmetric key to encrypt the sensitive data. |
|
ExportCspBlob ( bool includePrivateParameters ) : byte[] |
Exports a blob containing the key information associated with an RSACryptoServiceProvider object.
|
|
ExportParameters ( bool includePrivateParameters ) : |
Exports the RSAParameters
|
|
ImportCspBlob ( byte keyBlob ) : void |
Imports a blob that represents RSA key information
|
|
ImportParameters ( |
Imports the specified RSAParameters
|
|
RSACryptoServiceProvider ( ) : System.Diagnostics | ||
RSACryptoServiceProvider ( |
||
RSACryptoServiceProvider ( int dwKeySize ) : System.Diagnostics | ||
RSACryptoServiceProvider ( int dwKeySize, |
||
SignData ( |
Computes the hash value of a subset of the specified byte array using the specified hash algorithm, and signs the resulting hash value.
|
|
SignData ( byte buffer, Object halg ) : byte[] |
Computes the hash value of a subset of the specified byte array using the specified hash algorithm, and signs the resulting hash value.
|
|
SignData ( byte buffer, int offset, int count, object halg ) : byte[] |
Computes the hash value of a subset of the specified byte array using the specified hash algorithm, and signs the resulting hash value.
|
|
SignHash ( byte hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding ) : byte[] | ||
SignHash ( byte rgbHash, string str ) : byte[] |
Computes the hash value of a subset of the specified byte array using the specified hash algorithm, and signs the resulting hash value.
|
|
VerifyData ( byte buffer, object halg, byte signature ) : bool |
Verifies the signature of a hash value.
|
|
VerifyHash ( byte hash, byte signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding ) : bool | ||
VerifyHash ( byte rgbHash, string str, byte rgbSignature ) : bool |
Verifies the signature of a hash value.
|
Метод | Описание | |
---|---|---|
Dispose ( bool disposing ) : void |
Dispose the key handles
|
|
HashData ( |
||
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
|
|
GetAlgorithmId ( HashAlgorithmName hashAlgorithm ) : int | ||
GetHashAlgorithm ( HashAlgorithmName hashAlgorithm ) : |
||
HashAlgorithmNameNullOrEmpty ( ) : Exception | ||
IsPublic ( |
Since P is required, we will assume its presence is synonymous to a private key.
|
|
IsPublic ( byte keyBlob ) : bool |
find whether an RSA key blob is public.
|
|
PaddingModeNotSupported ( ) : Exception | ||
RSACryptoServiceProvider ( int keySize, |
||
SignHash ( byte rgbHash, int calgHash ) : byte[] |
Computes the hash value of a subset of the specified byte array using the specified hash algorithm, and signs the resulting hash value.
|
|
VerifyHash ( byte rgbHash, int calgHash, byte rgbSignature ) : bool |
Verifies the signature of a hash value.
|
public Decrypt ( byte data, RSAEncryptionPadding padding ) : byte[] | ||
data | byte | |
padding | RSAEncryptionPadding | |
Результат | byte[] |
public Decrypt ( byte rgb, bool fOAEP ) : byte[] | ||
rgb | byte | encrypted data |
fOAEP | bool | true to use OAEP padding (PKCS #1 v2), false to use PKCS #1 type 2 padding |
Результат | byte[] |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
Результат | void |
public Encrypt ( byte data, RSAEncryptionPadding padding ) : byte[] | ||
data | byte | |
padding | RSAEncryptionPadding | |
Результат | byte[] |
public Encrypt ( byte rgb, bool fOAEP ) : byte[] | ||
rgb | byte | raw data to encrypt |
fOAEP | bool | true to use OAEP padding (PKCS #1 v2), false to use PKCS #1 type 2 padding |
Результат | byte[] |
public ExportCspBlob ( bool includePrivateParameters ) : byte[] | ||
includePrivateParameters | bool | |
Результат | byte[] |
public ExportParameters ( bool includePrivateParameters ) : |
||
includePrivateParameters | bool | |
Результат |
protected HashData ( |
||
data | ||
hashAlgorithm | HashAlgorithmName | |
Результат | byte[] |
protected HashData ( byte data, int offset, int count, HashAlgorithmName hashAlgorithm ) : byte[] | ||
data | byte | |
offset | int | |
count | int | |
hashAlgorithm | HashAlgorithmName | |
Результат | byte[] |
public ImportCspBlob ( byte keyBlob ) : void | ||
keyBlob | byte | |
Результат | void |
public ImportParameters ( |
||
parameters | ||
Результат | void |
public RSACryptoServiceProvider ( ) : System.Diagnostics | ||
Результат | System.Diagnostics |
public RSACryptoServiceProvider ( |
||
parameters | ||
Результат | System.Diagnostics |
public RSACryptoServiceProvider ( int dwKeySize ) : System.Diagnostics | ||
dwKeySize | int | |
Результат | System.Diagnostics |
public RSACryptoServiceProvider ( int dwKeySize, |
||
dwKeySize | int | |
parameters | ||
Результат | System.Diagnostics |
public SignData ( |
||
inputStream | The input data for which to compute the hash | |
halg | Object | The hash algorithm to use to create the hash value. |
Результат | byte[] |
public SignData ( byte buffer, Object halg ) : byte[] | ||
buffer | byte | The input data for which to compute the hash |
halg | Object | The hash algorithm to use to create the hash value. |
Результат | byte[] |
public SignData ( byte buffer, int offset, int count, object halg ) : byte[] | ||
buffer | byte | The input data for which to compute the hash |
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. |
halg | object | The hash algorithm to use to create the hash value. |
Результат | byte[] |
public SignHash ( byte hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding ) : byte[] | ||
hash | byte | |
hashAlgorithm | HashAlgorithmName | |
padding | RSASignaturePadding | |
Результат | byte[] |
public SignHash ( byte rgbHash, string str ) : byte[] | ||
rgbHash | byte | The input data for which to compute the hash |
str | string | The hash algorithm to use to create the hash value. |
Результат | byte[] |
public VerifyData ( byte buffer, object halg, byte signature ) : bool | ||
buffer | byte | |
halg | object | |
signature | byte | |
Результат | bool |
public VerifyHash ( byte hash, byte signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding ) : bool | ||
hash | byte | |
signature | byte | |
hashAlgorithm | HashAlgorithmName | |
padding | RSASignaturePadding | |
Результат | bool |
public VerifyHash ( byte rgbHash, string str, byte rgbSignature ) : bool | ||
rgbHash | byte | |
str | string | |
rgbSignature | byte | |
Результат | bool |