C# Class GSF.Security.Cryptography.Cipher.KeyIVCache

Represents an inter-process serializable cryptographic key and initialization vector cache.
Inheritance: GSF.IO.InterprocessCache
Afficher le fichier Open project: GridProtectionAlliance/gsf

Private Properties

Свойство Type Description
WaitForDataReady void

Méthodes publiques

Méthode Description
ExportKeyIV ( string password, int keySize ) : string

Exports a key and initialization vector from the local system key cache.

This method is used to manually export a key to be installed on another computer.

GetCryptoKeyIV ( string password, int keySize ) : byte[][]

Gets the crypto key and initialization vector for the given user password.

ImportKeyIV ( string password, int keySize, string keyIVText ) : void

Imports a key and initialization vector into the local system key cache.

This method is used to manually import a key created on another computer.

KeyIVExists ( string password, int keySize ) : bool

Determines if a key and initialization vector exists for the given password.

MergeLeft ( KeyIVCache other ) : void

Merge keys and initialization vectors from another KeyIVCache, local cache taking precedence.

MergeRight ( KeyIVCache other ) : void

Merge keys and initialization vectors from another KeyIVCache, other cache taking precedence.

Save ( ) : void

Initiates inter-process synchronized save of key and initialization vector table.

Méthodes protégées

Méthode Description
LoadFileData ( FileStream fileStream ) : byte[]

Handles deserialization of file from disk; virtual method allows customization (e.g., pre-load decryption and/or data merge).

Consumers overriding this method should not directly call InterprocessCache.FileData property to avoid potential dead-locks.

SaveFileData ( FileStream fileStream, byte fileData ) : void

Handles serialization of file to disk; virtual method allows customization (e.g., pre-save encryption and/or data merge).

Consumers overriding this method should not directly call InterprocessCache.FileData property to avoid potential dead-locks.

Private Methods

Méthode Description
WaitForDataReady ( ) : void

Method Details

ExportKeyIV() public méthode

Exports a key and initialization vector from the local system key cache.
This method is used to manually export a key to be installed on another computer.
public ExportKeyIV ( string password, int keySize ) : string
password string User password used for key lookup.
keySize int Specifies the desired key size.
Résultat string

GetCryptoKeyIV() public méthode

Gets the crypto key and initialization vector for the given user password.
public GetCryptoKeyIV ( string password, int keySize ) : byte[][]
password string User password used for key lookup.
keySize int Specifies the desired key size.
Résultat byte[][]

ImportKeyIV() public méthode

Imports a key and initialization vector into the local system key cache.
This method is used to manually import a key created on another computer.
public ImportKeyIV ( string password, int keySize, string keyIVText ) : void
password string User password used for key lookups.
keySize int Specifies the desired key size.
keyIVText string Text based key and initialization vector to import into local key cache.
Résultat void

KeyIVExists() public méthode

Determines if a key and initialization vector exists for the given password.
public KeyIVExists ( string password, int keySize ) : bool
password string User password used for key lookups.
keySize int Specifies the desired key size.
Résultat bool

LoadFileData() protected méthode

Handles deserialization of file from disk; virtual method allows customization (e.g., pre-load decryption and/or data merge).
Consumers overriding this method should not directly call InterprocessCache.FileData property to avoid potential dead-locks.
protected LoadFileData ( FileStream fileStream ) : byte[]
fileStream System.IO.FileStream used to deserialize data.
Résultat byte[]

MergeLeft() public méthode

Merge keys and initialization vectors from another KeyIVCache, local cache taking precedence.
public MergeLeft ( KeyIVCache other ) : void
other KeyIVCache Other to merge with.
Résultat void

MergeRight() public méthode

Merge keys and initialization vectors from another KeyIVCache, other cache taking precedence.
public MergeRight ( KeyIVCache other ) : void
other KeyIVCache Other to merge with.
Résultat void

Save() public méthode

Initiates inter-process synchronized save of key and initialization vector table.
public Save ( ) : void
Résultat void

SaveFileData() protected méthode

Handles serialization of file to disk; virtual method allows customization (e.g., pre-save encryption and/or data merge).
Consumers overriding this method should not directly call InterprocessCache.FileData property to avoid potential dead-locks.
protected SaveFileData ( FileStream fileStream, byte fileData ) : void
fileStream System.IO.FileStream used to serialize data.
fileData byte File data to be serialized.
Résultat void