Used to encrypt sensitive properties, such as passwords, that are sent to the Content Engine server. The encryption is done using the public key retrieved from the
Domain
object associated with the object containing the sensitive property. Once the property is received on the server, it is decrypted with the domain's private key, then encrypted with the Content Engine master key prior to being persisted. Thus, this mechanism is intended to encrypt values only during transmission to the server, where they are immediately decrypted.
Static methods are available for encrypting bytes
, chars
, and Strings
. Note that the use of the method that encrypts Strings
is discouraged, as Strings
are immutable, so the sensitive data can remain in memory, posing a security risk, or it can be inadvertently written to disk as a result of exception handling or logging activity. Any char
or byte
array passed to an encrypt method is overwritten once the encryption has been performed. If the application needs to use the sensitive data after encryption, which should be an unusual case, it must make a copy prior to encryption.
chars
and Strings
are UTF-8 encoded prior to being encrypted.
The following tables list the members exposed by Encryption.
Public Methods
| Name | Description |
---|
  | Encrypt | Overloaded. Encrypts the given byte array using the public key from the Domain object associated with the given EngineObject . Note |
---|
After encryption is done, the input byte array is cleared. |
|
 | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object) |
 | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object) |
 | GetType | Gets the Type of the current instance. (inherited from Object) |
 | ToString | Returns a String that represents the current Object. (inherited from Object) |
Top
Protected Methods
| Name | Description |
---|
 | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object) |
 | MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object) |
Top
See Also