C# Class Keyczar.MutableKeySet

Mutable Keyset to allow modification and saving
Inheritance: IKeySet, IDisposable
Exibir arquivo Open project: jbtule/keyczar-dotnet Class Usage Examples

Public Methods

Method Description
AddKey ( KeyStatus status, Key key ) : int

Adds the key.

AddKey ( KeyStatus status, int keySize, object options = null ) : int

Adds the key.

Demote ( int version ) : KeyStatus

Demotes the specified version.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ForceKeyDataChange ( ) : void

Forces the flag for the says the key data has change.

GetKeyData ( int version ) : byte[]

Gets the binary data that the key is stored in.

MutableKeySet ( IKeySet keySet ) : System

Initializes a new instance of the MutableKeySet class.

MutableKeySet ( KeyMetadata emptyKeySet ) : System

Initializes a new instance of the MutableKeySet class.

MutableKeySet ( string location ) : System

Initializes a new instance of the MutableKeySet class.

Promote ( int version ) : KeyStatus

Promotes the specified version.

PublicKey ( ) : MutableKeySet

Returns keyset with only the public keys.

Revoke ( int version ) : bool

Revokes the specified version.

Save ( IKeySetWriter writer ) : bool

Saves using the specified writer.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

MutableKeySet ( KeyMetadata metadata, Key>.IDictionary keys ) : System

Initializes a new instance of the MutableKeySet class.

Method Details

AddKey() public method

Adds the key.
public AddKey ( KeyStatus status, Key key ) : int
status KeyStatus The status.
key Key The key.
return int

AddKey() public method

Adds the key.
public AddKey ( KeyStatus status, int keySize, object options = null ) : int
status KeyStatus The status.
keySize int Size of the key.
options object The options. dictionary or annoymous type of properties to set
return int

Demote() public method

Demotes the specified version.
public Demote ( int version ) : KeyStatus
version int The version.
return KeyStatus

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

ForceKeyDataChange() public method

Forces the flag for the says the key data has change.
public ForceKeyDataChange ( ) : void
return void

GetKeyData() public method

Gets the binary data that the key is stored in.
public GetKeyData ( int version ) : byte[]
version int The version.
return byte[]

MutableKeySet() public method

Initializes a new instance of the MutableKeySet class.
public MutableKeySet ( IKeySet keySet ) : System
keySet IKeySet The key set.
return System

MutableKeySet() public method

Initializes a new instance of the MutableKeySet class.
Only empty key sets can be created using just the KeyMetadata.
public MutableKeySet ( KeyMetadata emptyKeySet ) : System
emptyKeySet KeyMetadata The metadata of an empty key set.
return System

MutableKeySet() protected method

Initializes a new instance of the MutableKeySet class.
protected MutableKeySet ( KeyMetadata metadata, Key>.IDictionary keys ) : System
metadata KeyMetadata The metadata.
keys Key>.IDictionary The keys.
return System

MutableKeySet() public method

Initializes a new instance of the MutableKeySet class.
public MutableKeySet ( string location ) : System
location string The location.
return System

Promote() public method

Promotes the specified version.
public Promote ( int version ) : KeyStatus
version int The version.
return KeyStatus

PublicKey() public method

Returns keyset with only the public keys.
public PublicKey ( ) : MutableKeySet
return MutableKeySet

Revoke() public method

Revokes the specified version.
public Revoke ( int version ) : bool
version int The version.
return bool

Save() public method

Saves using the specified writer.
public Save ( IKeySetWriter writer ) : bool
writer IKeySetWriter The writer.
return bool