IQryptParseObject is derived from ParseObject so it has same properties and methods and transparently encrypts the fields values that were set via IQryptConfigurator.EncryptField(...) method. Example:

IQryptParseConfigurator.EncryptField("Armor", "myIntField", EncryptionType.OPE, typeof(int));
IQryptParseConfigurator.EncryptField("Armor", "myStringField", EncryptionType.DET, typeof(string));

//create new object of Class named Armor
IQryptParseObject obj = new IQryptParseObject("Armor");
obj["myIntField"]=30; // 30 value is encrypted with OPE encryption scheme automatically
obj["myStringField"]= "Sensitive_Info"; // the string is encrypted with DET encryption scheme automatically

IQryptParseObject let you mix encrypted fields and non-encrypted fields, so you can encrypt only desired fields. For example following field value will not be encrypted because it was not set to be encrypted via IQryptParseConfigurator.EncryptField(...) method:

obj["myPlainTextField"]= "non_sensitive_info";

Data Types

At this moment there are 3 types of encryption schemes that you can set to encrypt field values. Each encryption scheme allows different data types to be stored.

  • OPE - order preserving encryption - allows you to store following field types: Int, Long, Float, Double, DateTime

  • DET - deterministic encryption - allows you to store any type that can be serialized to JSON, ex: all primitive types(int, float, etc), DateTime, IList, Dictionary and POCO/complex types.

  • RND - randomized encryption - allows you to store any type that can be serialized to JSON, ex: all primitive types(int, float, etc), DateTime, IList, Dictionary and POCO/complex types.

Example:

public class SensitiveData
{
    public string CreditCard{get;set;}
    public string HealthRelatedInfo {get;set}
}
................

IQryptParseConfigurator.EncryptField("Armor", "myIntField", EncryptionType.OPE, typeof(int));
IQryptParseConfigurator.EncryptField("Armor", "myStringField", EncryptionType.DET, typeof(string));
IQryptParseConfigurator.EncryptField("Armor", "myPOCO", EncryptionType.RND, typeof(SensitiveData));

//create new object of Class named Armor
IQryptParseObject obj = new IQryptParseObject("Armor");
obj["myIntField"]=30; // 30 value is encrypted with OPE encryption scheme automatically
obj["myStringField"]= "Sensitive_Info"; // the string is encrypted with DET encryption scheme automatically
obj["myPOCO"] = new SensitiveData(); // the SensitiveData object will be serialized to JSON and then encrypted

Inside Parse, all encrypted fields are stored in a String field type. You can see encrypted values via Parse Data Browser.