메소드 | 설명 | |
---|---|---|
CreateWebSafeBase64Thumbprint ( this cryptoProvider, byte buffer ) : string |
Creates a web safe base64 thumbprint of some buffer.
|
|
Decrypt ( this cryptoProvider, |
Symmetrically decrypts a buffer using the specified key.
|
|
DecryptAsync ( this cryptoProvider, Stream ciphertext, Stream plaintext, |
Symmetrically decrypts a stream.
|
|
Encrypt ( this cryptoProvider, byte data, |
Symmetrically encrypts the specified buffer using a randomly generated key.
|
|
EncryptAsync ( this cryptoProvider, Stream plaintext, Stream ciphertext, |
Symmetrically encrypts a stream.
|
|
GetHashAlgorithmName ( this algorithm ) : string |
Gets the name of the hash algorithm.
|
|
IsThumbprintMatch ( byte buffer, string allegedHashWebSafeBase64Thumbprint ) : bool |
Determines whether a given thumbprint matches the actual hash of the specified buffer.
|
|
ParseHashAlgorithmName ( string algorithmName ) : HashAlgorithm? |
Parses the name of the hash algorithm into an enum.
|
메소드 | 설명 | |
---|---|---|
GetSignatureProvider ( string hashAlgorithm ) : AsymmetricAlgorithm |
Gets the signature provider.
|
|
IsHashMatchWithTolerantHashAlgorithm ( this cryptoProvider, byte data, byte expectedHash, HashAlgorithm hashAlgorithm ) : bool |
Computes the hash of the specified buffer and checks for a match to an expected hash.
|
|
NewSymmetricEncryptionVariables ( |
Generates a new set of encryption variables.
|
|
ThisOrNewEncryptionVariables ( |
Returns the specified encryption variables if they are non-null, or generates new ones.
|
|
VerifySignatureWithTolerantHashAlgorithm ( byte signingPublicKey, byte data, byte signature, AsymmetricAlgorithm signingAlgorithm = null ) : bool |
Verifies the asymmetric signature of some data blob.
|
public static CreateWebSafeBase64Thumbprint ( this cryptoProvider, byte buffer ) : string | ||
cryptoProvider | this | The crypto provider. |
buffer | byte | The buffer. |
리턴 | string |
public static Decrypt ( this cryptoProvider, |
||
cryptoProvider | this | The crypto provider. |
data | The encrypted data and the key and IV used to encrypt it. | |
리턴 | byte[] |
public static DecryptAsync ( this cryptoProvider, Stream ciphertext, Stream plaintext, |
||
cryptoProvider | this | The crypto provider. |
ciphertext | Stream | The stream of ciphertext to decrypt. |
plaintext | Stream | The stream to receive the plaintext. |
encryptionVariables | The key and IV to use. | |
cancellationToken | A cancellation token. | |
리턴 | Task |
public static Encrypt ( this cryptoProvider, byte data, |
||
cryptoProvider | this | The crypto provider. |
data | byte | The data to encrypt. |
encryptionVariables | Optional encryption variables to use; or |
|
리턴 |
public static EncryptAsync ( this cryptoProvider, Stream plaintext, Stream ciphertext, |
||
cryptoProvider | this | The crypto provider. |
plaintext | Stream | The stream of plaintext to encrypt. |
ciphertext | Stream | The stream to receive the ciphertext. |
encryptionVariables | An optional key and IV to use. May be |
|
cancellationToken | A cancellation token. | |
리턴 | Task |
public static GetHashAlgorithmName ( this algorithm ) : string | ||
algorithm | this | The algorithm. |
리턴 | string |
public static IsThumbprintMatch ( byte buffer, string allegedHashWebSafeBase64Thumbprint ) : bool | ||
buffer | byte | The buffer. |
allegedHashWebSafeBase64Thumbprint | string | The web-safe base64 encoding of the thumbprint that the specified buffer's thumbprint is expected to match. |
리턴 | bool |
public static ParseHashAlgorithmName ( string algorithmName ) : HashAlgorithm? | ||
algorithmName | string | Name of the algorithm. Null is allowed. |
리턴 | HashAlgorithm? |