public async Task <Content> EncryptForUser(Content content, ChadderContact contact)
        {
            var key = new ECDHUser(db.LocalUser.UserId, contact.UserId);

            return(await AES256WithKey.Encrypt(this, key, content));
        }
예제 #2
0
        public async Task <Content> EncryptForDevice(Content content, ChadderUserDevice device)
        {
            var key = new ECDHDevice(db.LocalDevice.DeviceId, device.DeviceId);

            return(await AES256WithKey.Encrypt(this, key, content));
        }