Merge "Fix bug in new encryption API" into nyc-dev