Subsequent calls to AES encrypt with the same key and the same data will yield different result. This is because we generate different IV for each call. Generally speaking this is OK, but for large notifs we want the same result to minimize the number of uploads to blob service. We can achieve this by generating IV once per notif and using it while encrypting for different devices.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Comment Actions
I am actually starting to question this. While putting those diffs I came up with better idea how to achieve the same effect using just JS. I will try to get on phab tomorrow morning. The idea is to pass to createAPNsVisualNotif and createAndroidVisualNotif a map from stringified unencrypted notification + messageInfo to a promise resolving to its encrypted version and a hash.
Comment Actions
Please avoid the initialism "IV" in factor of "InitVector", "InitializationVector", etc.