C# Class NSoft.NFramework.Data.NHibernateEx.Domain.UserTypes.AbstractSymmetricEncryptStringUserType

문자열을 암호화하여 저장하는 UserType입니다. 보안에 사용하면 좋습니다.
Inheritance: IUserType
ファイルを表示 Open project: debop/NFramework

Public Methods

Method Description
Assemble ( object cached, object owner ) : object

Reconstruct an object from the cacheable representation. At the very least this method should perform a deep copy if the type is mutable. (optional operation)

Decrypt ( string cipherText ) : string

Hex Format으로 암호화된 문자열을 복호화하여 원래 문자열로 반환한다.

DeepCopy ( object value ) : object

Return a deep copy of the persistent state, stopping at entities and at collections.

Disassemble ( object value ) : object

Transform the object into its cacheable representation. At the very least this method should perform a deep copy if the type is mutable. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation)

Encrypt ( string plainText ) : string

문자열을 암호화하여 Hex Format의 문자열로 반환한다.

Equals ( object x, object y ) : bool

Compare two instances of the class mapped by this type for persistent "equality" ie. equality of persistent state

GetHashCode ( object x ) : int

Get a hashcode for the instance, consistent with persistence "equality"

NullSafeGet ( IDataReader rs, string names, object owner ) : object

Retrieve an instance of the mapped class from a JDBC resultset. Implementors should handle possibility of null values.

NullSafeSet ( IDbCommand cmd, object value, int index ) : void

Write an instance of the mapped class to a prepared statement. Implementors should handle possibility of null values. A multi-column type should be written to parameters starting from index.

Replace ( object original, object target, object owner ) : object

During merge, replace the existing (target) value in the entity we are merging to with a new (original) value from the detached entity we are merging. For immutable objects, or null values, it is safe to simply return the first parameter. For mutable objects, it is safe to return a copy of the first parameter. For objects with component values, it might make sense to recursively replace component values.

Method Details

Assemble() public method

Reconstruct an object from the cacheable representation. At the very least this method should perform a deep copy if the type is mutable. (optional operation)
public Assemble ( object cached, object owner ) : object
cached object the object to be cached
owner object the owner of the cached object
return object

Decrypt() public method

Hex Format으로 암호화된 문자열을 복호화하여 원래 문자열로 반환한다.
public Decrypt ( string cipherText ) : string
cipherText string Hex Format으로 암호화된 문자열
return string

DeepCopy() public method

Return a deep copy of the persistent state, stopping at entities and at collections.
public DeepCopy ( object value ) : object
value object generally a collection element or entity field
return object

Disassemble() public method

Transform the object into its cacheable representation. At the very least this method should perform a deep copy if the type is mutable. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation)
public Disassemble ( object value ) : object
value object the object to be cached
return object

Encrypt() public method

문자열을 암호화하여 Hex Format의 문자열로 반환한다.
public Encrypt ( string plainText ) : string
plainText string 암호화할 문자열
return string

Equals() public method

Compare two instances of the class mapped by this type for persistent "equality" ie. equality of persistent state
public Equals ( object x, object y ) : bool
x object
y object
return bool

GetHashCode() public method

Get a hashcode for the instance, consistent with persistence "equality"
public GetHashCode ( object x ) : int
x object
return int

NullSafeGet() public method

Retrieve an instance of the mapped class from a JDBC resultset. Implementors should handle possibility of null values.
HibernateException
public NullSafeGet ( IDataReader rs, string names, object owner ) : object
rs IDataReader a IDataReader
names string column names
owner object the containing entity
return object

NullSafeSet() public method

Write an instance of the mapped class to a prepared statement. Implementors should handle possibility of null values. A multi-column type should be written to parameters starting from index.
HibernateException
public NullSafeSet ( IDbCommand cmd, object value, int index ) : void
cmd IDbCommand a IDbCommand
value object the object to write
index int command parameter index
return void

Replace() public method

During merge, replace the existing (target) value in the entity we are merging to with a new (original) value from the detached entity we are merging. For immutable objects, or null values, it is safe to simply return the first parameter. For mutable objects, it is safe to return a copy of the first parameter. For objects with component values, it might make sense to recursively replace component values.
public Replace ( object original, object target, object owner ) : object
original object the value from the detached entity being merged
target object the value in the managed entity
owner object the managed entity
return object