C# Класс KeePassLib.Keys.CompositeKey

Represents a key. A key can be build up using several user key data sources like a password, a key file, the currently logged on user credentials, the current computer ID, etc.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddUserKey ( IUserKey pKey ) : void

/// Deconstructor, clears up the key. ///

/// Clears the key. This function also erases all previously stored /// user key data objects. ///

Add a user key.

CompositeKey ( ) : Org.BouncyCastle.Crypto

Construct a new, empty key object.

ContainsType ( Type tUserKeyType ) : bool

Test whether the composite key contains a specific type of user keys (password, key file, ...). If at least one user key of that type is present, the function returns true.

EqualsValue ( CompositeKey ckOther ) : bool
GenerateKey32 ( byte pbKeySeed32, ulong uNumRounds ) : KeePassLib.Security.ProtectedBinary

Generate a 32-bit wide key out of the composite key.

GetUserKey ( Type tUserKeyType ) : IUserKey

Get the first user key of a specified type.

RemoveUserKey ( IUserKey pKey ) : bool

Remove a user key.

TransformKeyBenchmark ( uint uMilliseconds, ulong uStep ) : ulong

Benchmark the TransformKey method. Within uMilliseconds ms, random keys will be transformed and the number of performed transformations are returned.

TransformKeyManaged ( byte pbNewKey32, byte pbKeySeed32, ulong uNumRounds ) : bool

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

Метод Описание
CreateRawCompositeKey32 ( ) : byte[]

Creates the composite key from the supplied user key sources (password, key file, user account, computer ID, etc.).

TransformKey ( byte pbOriginalKey32, byte pbKeySeed32, ulong uNumRounds ) : byte[]

Transform the current key uNumRounds times.

ValidateUserKeys ( ) : void

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

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

/// Deconstructor, clears up the key. /// /// Clears the key. This function also erases all previously stored /// user key data objects. /// Add a user key.
public AddUserKey ( IUserKey pKey ) : void
pKey IUserKey User key to add.
Результат void

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

Construct a new, empty key object.
public CompositeKey ( ) : Org.BouncyCastle.Crypto
Результат Org.BouncyCastle.Crypto

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

Test whether the composite key contains a specific type of user keys (password, key file, ...). If at least one user key of that type is present, the function returns true.
public ContainsType ( Type tUserKeyType ) : bool
tUserKeyType System.Type User key type.
Результат bool

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

public EqualsValue ( CompositeKey ckOther ) : bool
ckOther CompositeKey
Результат bool

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

Generate a 32-bit wide key out of the composite key.
public GenerateKey32 ( byte pbKeySeed32, ulong uNumRounds ) : KeePassLib.Security.ProtectedBinary
pbKeySeed32 byte Seed used in the key transformation /// rounds. Must be a byte array containing exactly 32 bytes; must /// not be null.
uNumRounds ulong Number of key transformation rounds.
Результат KeePassLib.Security.ProtectedBinary

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

Get the first user key of a specified type.
public GetUserKey ( Type tUserKeyType ) : IUserKey
tUserKeyType System.Type Type of the user key to get.
Результат IUserKey

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

Remove a user key.
public RemoveUserKey ( IUserKey pKey ) : bool
pKey IUserKey User key to remove.
Результат bool

TransformKeyBenchmark() публичный статический Метод

Benchmark the TransformKey method. Within uMilliseconds ms, random keys will be transformed and the number of performed transformations are returned.
public static TransformKeyBenchmark ( uint uMilliseconds, ulong uStep ) : ulong
uMilliseconds uint Test duration in ms.
uStep ulong Stepping. /// should be a prime number. For fast processors /// (PCs) a value of 3001 is recommended, for slower processors (PocketPC) /// a value of 401 is recommended.
Результат ulong

TransformKeyManaged() публичный статический Метод

public static TransformKeyManaged ( byte pbNewKey32, byte pbKeySeed32, ulong uNumRounds ) : bool
pbNewKey32 byte
pbKeySeed32 byte
uNumRounds ulong
Результат bool