C# Класс GSF.Security.Cryptography.Cipher.KeyIVCache

Represents an inter-process serializable cryptographic key and initialization vector cache.
Наследование: GSF.IO.InterprocessCache
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
WaitForDataReady void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
WaitForDataReady ( ) : void

Описание методов

ExportKeyIV() публичный Метод

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.
Результат string

GetCryptoKeyIV() публичный Метод

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.
Результат byte[][]

ImportKeyIV() публичный Метод

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.
Результат void

KeyIVExists() публичный Метод

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.
Результат bool

LoadFileData() защищенный Метод

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.
Результат byte[]

MergeLeft() публичный Метод

Merge keys and initialization vectors from another KeyIVCache, local cache taking precedence.
public MergeLeft ( KeyIVCache other ) : void
other KeyIVCache Other to merge with.
Результат void

MergeRight() публичный Метод

Merge keys and initialization vectors from another KeyIVCache, other cache taking precedence.
public MergeRight ( KeyIVCache other ) : void
other KeyIVCache Other to merge with.
Результат void

Save() публичный Метод

Initiates inter-process synchronized save of key and initialization vector table.
public Save ( ) : void
Результат void

SaveFileData() защищенный Метод

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.
Результат void