Show / Hide Table of Contents

Class DSACryptoServiceProvider

Provides methods for encrypting text with an open key using the DSA algorithm.

Inheritance
System.Object
DSACryptoServiceProvider
CoreDsaCryptoServiceProvider
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Common
Assembly: Terrasoft.Common.dll
Syntax
[ComVisible(true)]
public class DSACryptoServiceProvider : IDisposable

Constructors

DSACryptoServiceProvider()

Initializes the specified DSACryptoServiceProvider instance.

Declaration
public DSACryptoServiceProvider()

Properties

KeyContainerName

The name of the key owner.

Declaration
public string KeyContainerName { get; set; }
Property Value
Type Description
System.String

KeySize

The size of the key in bytes.

Declaration
public int KeySize { get; set; }
Property Value
Type Description
System.Int32

PrivateKey

The value of the private key.

Declaration
public string PrivateKey { get; set; }
Property Value
Type Description
System.String

PublicKey

The value of the public key.

Declaration
public string PublicKey { get; }
Property Value
Type Description
System.String

Methods

Close()

Declaration
[Obsolete("7.14.3 | Method is not in use and will be removed in upcoming releases")]
public void Close()

ConvertToBase64String(String, DSASignatureFormatter)

Declaration
protected string ConvertToBase64String(string data, DSASignatureFormatter signatureFormatter)
Parameters
Type Name Description
System.String data
System.Security.Cryptography.DSASignatureFormatter signatureFormatter
Returns
Type Description
System.String

Dispose()

Deletes, releases and resets resources. Cancels the Finalize() call for this instance.

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

SignData(String, String)

Encrypts the specified text using the specified secret key.

Declaration
public virtual string SignData(string data, string privateKey)
Parameters
Type Name Description
System.String data

The text for encryption.

System.String privateKey

Secret key.

Returns
Type Description
System.String

The string that represents the encrypted text in the base64 format.

VerifyData(String, String, String)

Verifies the specified encrypted text with the set public key.

Declaration
public virtual bool VerifyData(string data, string signedData, string publicKey)
Parameters
Type Name Description
System.String data

Reference for verification.

System.String signedData

Encrypted text in the base64 format.

System.String publicKey

Public key.

Returns
Type Description
System.Boolean

VerifySignature(String, String, DSASignatureDeformatter)

Declaration
protected bool VerifySignature(string data, string signedData, DSASignatureDeformatter signatureDeformatter)
Parameters
Type Name Description
System.String data
System.String signedData
System.Security.Cryptography.DSASignatureDeformatter signatureDeformatter
Returns
Type Description
System.Boolean

Implements

System.IDisposable

Extension Methods

ReflectionUtilities.GetPropertyValue(Object, String)
ReflectionUtilities.GetPropertyDefValue(Object, String, Object)
ReflectionUtilities.TryGetPropertyValue(Object, String, out Object)
ReflectionUtilities.HasProperty(Object, String)
ReflectionUtilities.GetPropertyValue(Object, String, BindingFlags)
ReflectionUtilities.GetPropertyValueByPath(Object, String)
ReflectionUtilities.SetPropertyValue(Object, String, Object)
ReflectionUtilities.TrySetPropertyValue(Object, String, Object)
ValidateUtilities.CheckArgumentNull(Object, String)
ValidateUtilities.CheckDependencyNull(Object, String)
ValidateUtilities.EnsureDependencyNotNull<T>(T, String)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance, Boolean)
NSubstituteExtension.Protected(Object, String, Object[])
NSubstituteExtension.Protected(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedProperty(Object, String)
NSubstituteExtension.MatchInstance<T>(T)
SubstituteUtilities.GetIsSubstituteObject(Object)
SubstituteUtilities.Instead<TInstance, TValue>(TInstance, Func<TInstance, TValue>)
Back to top Generated by DocFX