DefaultSymmetricKeyGenerator

Creates a key for the SymmetricCryptographer that use an initializator vector of 16 bytes and a key of 32 bytes based on two provided keys.

Namespace:
Inetdev.Security.Cryptography
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
System.Object
Implements:
Inetdev.Security.Cryptography.IKeyGenerator

Constructors

DefaultSymmetricKeyGenerator

Initializes a new instance DefaultSymmetricKeyGenerator.

Signature:
public Void DefaultSymmetricKeyGenerator(key1, key2)
Parameters
Name Type Summary
key1 String The first key.
key2 String The second key.
Exceptions
Type Summary
ArgumentException Thrown when key1 or key2 are null or empty.

Properties

Key1

Gets or sets the first key.

Signature:
public String Key1 { get; set; }

Key2

Gets or sets the second key.

Signature:
public String Key2 { get; set; }

Methods

GenerateKey

Generates an encription key from the two keys for the specified symmetric algorithm. If algorithmType is null, RijndaelManaged is used.

Signature:
public Byte[] GenerateKey(algorithmType)
Returns

A computed key.

Parameters
Name Type Summary
algorithmType Type Algorithm Type.
Exceptions
Type Summary
ArgumentException Thown the algorithmType is not a SymmetricAlgorithm.