IQryptParse lets you transparently make queries to Parse service without explicitly encrypt/decrypt values. You can query encrypted values and get ParseObjects through IQryptParseQuery class which is derived from ParseQuery class. The following methods are overridden and they encrypt values passed before they are sent to Parse service:

  • whereEqualTo
  • whereNotEqualTo
  • whereGreaterThan
  • whereGreaterThanOrEqualTo
  • whereLessThan
  • whereLessThanOrEqualTo
  • whereContainedIn
  • whereContainsAll
  • whereNotContainedIn

Example:

 IQryptParseQuery<IQryptParseObject> query = new IQryptParseQuery<IQryptParseObject>("Armor")
                                      .whereEqualTo("myIntField", 30);
//30 value is encrypted first and then the encrypted value is sent to the Parse service

            List<IQryptParseObject> qVal = query.find();
            for (IQryptParseObject o : qVal)
            {
                assertEquals(30, o.get("myIntField"));
            }

Different encryption schemes allows different query types:

  • OPE - order preserving encryption - lets you do following types of queries:

    • whereEqualTo
    • whereNotEqualTo
    • whereGreaterThan
    • whereGreaterThanOrEqualTo
    • whereLessThan
    • whereLessThanOrEqualTo
    • whereContainedIn
    • whereContainsAll
    • whereNotContainedIn
  • DET - deterministic encryption - lets you do following types of queries:

    • whereEqualTo
    • whereNotEqualTo
    • whereContainedIn
    • whereContainsAll
    • whereNotContainedIn
  • RND - randomized encryption - does now allow any types of queries.

You can find more information about queries on Parse documentation.