Click or drag to resize
weroSoft AG, Software
CryptoServiceBase Class
The documentation is integral part of the weroSoft product documentation. This part is intended to be used by developers only.
Base class for the WeroSoft encryption and decryption of data.
Inheritance Hierarchy

Namespace:  WeroSoft.Security
Assembly:  WeroSoft.Core.Library (in WeroSoft.Core.Library.dll) Version: 3.0 Pre-Release
Syntax
C#
public abstract class CryptoServiceBase : IDisposable
Remarks
The class allows to use the different cryptographic algorithm below:
  • Aes (symmetric)
  • DES (symmetric)
  • RC2 (symmetric)
  • Rijndael (symmetric)
  • TripleDES (symmetric)
  • DSA (asymmetric)
  • RSA (asymmetric)
  • X509 (certificate)

The CryptoServiceBase type exposes the following members.

Constructors
  NameDescription
Protected methodCryptoServiceBase
Initializes a new instance of the type CryptoServiceBase.
Top
Properties
  NameDescription
Protected propertyAsymmetricCryptoProvider
Gets the asymmetric cryptographic provider actually used.
Public propertyCryptoProviderType
Gets the cryptographic service provider actually used.
Protected propertyDisposed
Gets a value indicates whether the class has already been disposed or not.
Public propertyIsSymmetric
Gets a value indicating whether the cryptography is working symmetrically or asymmetrically.
Public propertyKeyMode
Gets the key mode actually used.
Protected propertySymmetricCryptoProvider
Gets the symmetric cryptographic provider actually used.
Protected propertyTransformer
Gets the transformer actually used.
Public propertyUsedKeySize
Gets the key size in Bit actually used.
Protected propertyWorkingCryptoStream
Gets the cryptographic stream actually used.
Protected propertyWorkingIOStream
Gets the working output stream actually used.
Protected propertyWorkingStream
Gets the working stream actually used.
Top
Methods
  NameDescription
Public methodStatic memberCreateKey(CryptoProviderType, CryptoKeyMode, String)
Creates a key which is used for asymmetric working cryptographic algorithm.
Public methodStatic memberCreateKey(CryptoProviderType, CryptoKeyMode, CryptoKeyStore, String)
Creates a key which is used for asymmetric working cryptographic algorithm.
Protected methodStatic memberCreateKey(String, Byte, Int32, Byte, Int32)
Creates a key which is used for symmetric algorithm.
Public methodStatic memberDeleteKey(String, CryptoProviderType)
Deletes an asymmetric key from the key container.
Public methodStatic memberDeleteKey(String, CryptoKeyStore, CryptoProviderType)
Deletes an asymmetric key from the key container.
Public methodDispose
Disposes the object.
Protected methodDispose(Boolean)
Disposes the object in the hierarchy of classes.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodStatic memberExportKey(String, String, Boolean)
Exports an RSA key as encrypted string.
Public methodStatic memberExportKey(String, CryptoKeyStore, String, Boolean)
Exports an RSA key as encrypted string.
Public methodStatic memberExportKey(String, String, String, Boolean, CryptoProviderType)
Exports an asymmetric key to a file.
Public methodStatic memberExportKey(String, CryptoKeyStore, String, String, Boolean, CryptoProviderType)
Exports an asymmetric key to a file.
Public methodStatic memberExportPublicKey(String, CryptoProviderType)
Exports the public key part in a XML formatted string.
Public methodStatic memberExportPublicKey(String, CryptoKeyStore, CryptoProviderType)
Exports the public key part in a XML formatted string.
Protected methodFinalize
Finalizes the object if it was not properly disposed before.
(Overrides ObjectFinalize.)
Public methodStatic memberGenerateCode
Creates a secure code for accessing the store.
Public methodGetCryptoStream
Gets the configured cryptographic stream.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetKey(String, CryptoProviderType)
Gets the key from key store.
Public methodStatic memberGetKey(String, CryptoKeyStore, CryptoProviderType)
Gets the key from key store.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberImportKey(String, String, String, CryptoProviderType)
Imports an asymmetric key file to the cryptographic key container.
Public methodStatic memberImportKey(String, String, CryptoKeyStore, String, CryptoProviderType)
Imports an asymmetric key file to the cryptographic key container.
Public methodStatic memberImportKeyFromString(String, String, String, CryptoProviderType)
Imports a key from a encrypted string.
Public methodStatic memberImportKeyFromString(String, String, CryptoKeyStore, String, CryptoProviderType)
Imports a key from a encrypted string.
Public methodInitialize(String)
Public methodInitialize(String, CryptoKeyStore)
Protected methodInitializeCryptography
Protected methodInitializeInternal
Initializes the base elements of the cryptographic object.
Public methodStatic memberIsKeyExisting(String)
Gets a value indicating whether a key is existing or not.
Public methodStatic memberIsKeyExisting(String, CryptoKeyStore)
Gets a value indicating whether a key is existing or not.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberSecureHash
Hashes plan text and create a base 64 representation of it.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Protected fieldInitVector
Gets or sets the initiation vector.
Protected fieldKey
Gets or sets the key.
Top
Extension Methods
  NameDescription
Public Extension MethodClone(CloneWorkingMode, IEnumerableType)Overloaded.
Clones an object by serialization.
(Defined by RuntimeExtensions.)
Public Extension MethodCloneT(CloneWorkingMode, IEnumerableType)Overloaded.
Clones an object by serialization.
(Defined by RuntimeExtensions.)
Public Extension MethodConvert (Defined by DataConverterExtensions.)
Public Extension MethodCreateTraceDataEntry(StringBuilder, SourceLevels, TraceableKind, String)Overloaded.
Creates a data entry into a string builder according to the giving parameters.
(Defined by TraceExtensions.)
Public Extension MethodCreateTraceDataEntry(SourceLevels, TraceableKind, String, String, Int32)Overloaded.
Creates a trace entry for a data element.
(Defined by TraceExtensions.)
Public Extension MethodCreateTraceDataEntry(StringBuilder, SourceLevels, TraceableKind, String, String, Int32)Overloaded.
Creates a trace entry into a string builder.
(Defined by TraceExtensions.)
Public Extension MethodDynamicCast
Dynamically casts a reference to another type.
(Defined by TypeManagerHelper.)
Public Extension MethodExtractSystemParametersFromTrigger
Extracts the system parameters from a collection of trigger parameter and transform them to a dictionary using string keys and string values.
(Defined by TriggerExtensions.)
Public Extension MethodGetFieldValue(String)Overloaded.
Gets the data object held by a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetFieldValueT(String)Overloaded.
Gets the data object held by a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetPropertyValue(String)Overloaded.
Gets the data object held by a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetPropertyValueT(String)Overloaded.
Gets the data object held by a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodInject(Type, Object)Overloaded.
Injects all fields or properties which are marked with the defined attribute type name.
(Defined by DataInjection.)
Public Extension MethodInject(Type, Object, Boolean)Overloaded.
Injects all fields or properties which are marked with the defined attribute type name.
(Defined by DataInjection.)
Public Extension MethodInjectField
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInjectProperty(String, Object)Overloaded.
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInjectProperty(String, Type, Object)Overloaded.
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInvoke(String, Object)Overloaded.
Invokes a method on an object by reflection.
(Defined by UnitTest.)
Public Extension MethodInvokeTResult(String, Object)Overloaded.
Invokes a method on an object by reflection.
(Defined by UnitTest.)
Public Extension MethodSetFieldValue
Sets the data object on a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodSetPropertyValue
Sets the data object on a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodSetReadOnlyFieldValue
Sets the data object on a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodTryInjectProperty
Tries to Inject a value to a property within a data object.
(Defined by DataInjection.)
Top
See Also