Skip to main content

RSACryptoServiceProvider Class

Namespace: System.Security.Cryptography · Assembly: GHIElectronics.TinyCLR.System.Security.Cryptography

Concrete RSA implementation. Construct with the desired key size or with externally supplied RSAParameters.

public sealed class RSACryptoServiceProvider : RSA

Constructors

RSACryptoServiceProvider()

public RSACryptoServiceProvider()

No description available.

RSACryptoServiceProvider(int dwKeySize)

public RSACryptoServiceProvider(int dwKeySize)

No description available.

ParameterTypeDescription
dwKeySizeint

Properties

KeySize

public override int KeySize { get; set; }

No description available.

KeyExchangeAlgorithm

public override string KeyExchangeAlgorithm { get; }

No description available.

Methods

ExportParameters(bool includePrivateParameters)

public override RSAParameters ExportParameters(bool includePrivateParameters)

No description available.

ParameterTypeDescription
includePrivateParametersbool

Returns RSAParameters

ImportParameters(RSAParameters parameters)

public override void ImportParameters(RSAParameters parameters)

No description available.

ParameterTypeDescription
parametersRSAParameters

Encrypt(byte[] data, RSAEncryptionPadding padding)

public override byte[] Encrypt(byte[] data, RSAEncryptionPadding padding)

No description available.

ParameterTypeDescription
databyte[]
paddingRSAEncryptionPadding

Returns byte[]

Decrypt(byte[] data, RSAEncryptionPadding padding)

public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding)

No description available.

ParameterTypeDescription
databyte[]
paddingRSAEncryptionPadding

Returns byte[]

SignData(byte[] data, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)

public override byte[] SignData(byte[] data, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)

No description available.

ParameterTypeDescription
databyte[]
hashAlgorithmHashAlgorithmName
paddingRSASignaturePadding

Returns byte[]

SignHash(byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)

public override byte[] SignHash(byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)

No description available.

ParameterTypeDescription
hashbyte[]
hashAlgorithmHashAlgorithmName
paddingRSASignaturePadding

Returns byte[]

VerifyData(byte[] data, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)

public override bool VerifyData(byte[] data, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)

No description available.

ParameterTypeDescription
databyte[]
signaturebyte[]
hashAlgorithmHashAlgorithmName
paddingRSASignaturePadding

Returns bool

VerifyHash(byte[] hash, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)

public override bool VerifyHash(byte[] hash, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)

No description available.

ParameterTypeDescription
hashbyte[]
signaturebyte[]
hashAlgorithmHashAlgorithmName
paddingRSASignaturePadding

Returns bool

Encrypt(byte[] rgb, bool fOAEP)

public byte[] Encrypt(byte[] rgb, bool fOAEP)

No description available.

ParameterTypeDescription
rgbbyte[]
fOAEPbool

Returns byte[]

Decrypt(byte[] rgb, bool fOAEP)

public byte[] Decrypt(byte[] rgb, bool fOAEP)

No description available.

ParameterTypeDescription
rgbbyte[]
fOAEPbool

Returns byte[]

SignData(byte[] buffer, bool sha256)

public byte[] SignData(byte[] buffer, bool sha256 = false)

No description available.

ParameterTypeDescription
bufferbyte[]
sha256bool

Returns byte[]

VerifyData(byte[] buffer, byte[] signature, bool sha256)

public bool VerifyData(byte[] buffer, byte[] signature, bool sha256 = false)

No description available.

ParameterTypeDescription
bufferbyte[]
signaturebyte[]
sha256bool

Returns bool

Dispose()

public override void Dispose()

Releases buffered memory (the unmanaged firmware/application buffers). (inherited)