This class encapsulates the CipherDB Entity Framework operations
More...
|
static T | Create< T > (T db, string securityPartition=Default.PartitionId, string asRole=Default.RoleId) |
| Enlightens a regular entity framework database context to be Crypteron enabled i.e. all entities within this context will now be handled by the Crypteron security pipeline. More...
|
|
static T | Unseal< T > (T encObj, DbContext db, string securityPartition=Default.PartitionId, string asRole=Default.RoleId) |
| The default behaviour for CipherDB is to keep the POCO in an encrypted or sealed state after sending it off to the database. In some cases it may be useful to continue to use that sealed object and in those cases you'd want to unseal by this API call it to access the clear values again. More...
|
|
This class encapsulates the CipherDB Entity Framework operations
static T Crypteron.CipherDb.Session.Create< T > |
( |
T |
db, |
|
|
string |
securityPartition = Default.PartitionId , |
|
|
string |
asRole = Default.RoleId |
|
) |
| |
|
static |
Enlightens a regular entity framework database context to be Crypteron enabled i.e. all entities within this context will now be handled by the Crypteron security pipeline.
NOTE: The default operating mode for the Crypteron Entity Framework plugin is to leave entities/objects in an encrypted state after they are written to the database. Typically this isn't an issue but if you wish to decrypt just-written objects for additional use, you can invoke the Unseal<T> API either from CipherDB or from CipherObject (objects sealed via CipherDB can be unsealed from CipherObject and vice-versa)
- Template Parameters
-
- Parameters
-
db | |
securityPartition | Optional argument specifying the security partition this object should be sealed for. If not specified, the default security partition is used. |
asRole | Optional argument specifying the role that should be sealing this object. If not specified, the default role is used. |
- Returns
static T Crypteron.CipherDb.Session.Unseal< T > |
( |
T |
encObj, |
|
|
DbContext |
db, |
|
|
string |
securityPartition = Default.PartitionId , |
|
|
string |
asRole = Default.RoleId |
|
) |
| |
|
static |
The default behaviour for CipherDB is to keep the POCO in an encrypted or sealed state after sending it off to the database. In some cases it may be useful to continue to use that sealed object and in those cases you'd want to unseal by this API call it to access the clear values again.
- Template Parameters
-
- Parameters
-
encObj | |
db | The DbContext (or derived) class within which we wish to mark the entity as unchanged despite the Unseal operation. This is useful if you just want to decrypt/unseal the object but don't want to trigger any more subsiquent database writes |
securityPartition | Optional argument specifying the security partition this object should be sealed for. If not specified, the default security partition is used. |
asRole | Optional argument specifying the role that should be sealing this object. If not specified, the default role is used. |
- Returns