Crypteron C# API  2015.6.1.0
Crypteron.CipherDb.NH.Session Class Reference

Creates a CipherDB enabled NHibernate session More...

Static Public Member Functions

static ISession Create (Configuration cfg, string securityPartition, string asRole, bool multiThreadedUse=true)
 Initialize CipherDB if needed and open a session More...
 
static T Seal< T > (T plainObject, string securityPartition=Default.PartitionId, string asRole=Default.RoleId)
 Seal an object's secured properties. The specific properties that are sealed are based upon which properties have been decorated with the Secure attribute. The resulting encrypted object can then be sent to any storage or transport safely. Sealing involves key management, encryption and tamper protection.

At present only the first immediate properties of the object will be secured i.e. object.prop1 versus object.prop1.prop2 More...
 
static T Unseal< T > (T encryptedObject, string securityPartition=Default.PartitionId, string asRole=Default.RoleId)
 Unseals an object's secured properties. The specific properties that are unsealed are based upon which properties have been decorated with the Secure attribute. Unsealing involves key management, decryption and tamper protection checks. More...
 

Detailed Description

Creates a CipherDB enabled NHibernate session

Member Function Documentation

static ISession Crypteron.CipherDb.NH.Session.Create ( Configuration  cfg,
string  securityPartition,
string  asRole,
bool  multiThreadedUse = true 
)
static

Initialize CipherDB if needed and open a session

Parameters
cfgNHibernate base configuration
securityPartitionA string that identifies the security partition used to partition data into isolated pools. For example, security partitions can be used to separate data in a multi-tenant situation. Data is not shared cross-partition but a security partition can have ACLs that give multiple roles access to it's data. To limit cross-access to data, it's best to create a new security partition which will hold all common shared data (eg: 'all-tenants-common')
asRoleA string that identifies the role to assume when carrying out the current operation. A role could be defined as a user, group, device or anything defined by the application architect in their domain model. However defined, it should be consistent with the roles as defined in the ACLs associated with each security partition in the keychain(s)
multiThreadedUseThis enables sessions that are safe for multi-threaded operations but incur additional setup overheard during session creation.
static T Crypteron.CipherDb.NH.Session.Seal< T > ( plainObject,
string  securityPartition = Default.PartitionId,
string  asRole = Default.RoleId 
)
static

Seal an object's secured properties. The specific properties that are sealed are based upon which properties have been decorated with the Secure attribute. The resulting encrypted object can then be sent to any storage or transport safely. Sealing involves key management, encryption and tamper protection.

At present only the first immediate properties of the object will be secured i.e. object.prop1 versus object.prop1.prop2

Template Parameters
T
Parameters
plainObjectA standard object (POCO) with properties in cleartext
securityPartitionOptional argument specifying the security partition this object should be sealed for. If not specified, the default security partition is used.
asRoleOptional argument specifying the role that should be sealing this object. If not specified, the default role is used.
Returns
A standard object (POCO) with all or some of it's properties sealed
static T Crypteron.CipherDb.NH.Session.Unseal< T > ( encryptedObject,
string  securityPartition = Default.PartitionId,
string  asRole = Default.RoleId 
)
static

Unseals an object's secured properties. The specific properties that are unsealed are based upon which properties have been decorated with the Secure attribute. Unsealing involves key management, decryption and tamper protection checks.



At present only the first immediate properties of the object will be unsealed i.e. object.prop1 versus object.prop1.prop2

Template Parameters
T
Parameters
encryptedObjectA standard object (POCO) with it's secure properties encrypted
securityPartitionOptional argument specifying the security partition this object should be sealed for. If not specified, the default security partition is used.
asRoleOptional argument specifying the role that should be sealing this object. If not specified, the default role is used.
Returns
A standard object (POCO) with properties in cleartext