Example #1
0
        public void RetreiveFile(string recordId, string fileId, string fileUri)
        {
            var encryptedFileUri = GetEncryptedFileUri(recordId, fileId);
            var encryptedBytes   = DataGateway.GetBytes(encryptedFileUri);
            var fileByes         = Cryptor.GetDecryptedContent <byte[]>(encryptedBytes, _password);

            DataGateway.PutBytes(fileUri, fileByes);
        }
Example #2
0
        public void UpsertRecord(Record record)
        {
            var recordFileUri        = GetRecordFileUri(record.Header.Id);
            var encryptedRecordBytes = Cryptor.GetEncryptedBytes(record, _password);

            DataGateway.DeleteFileIfAvailable(recordFileUri);
            DataGateway.PutBytes(recordFileUri, encryptedRecordBytes);
        }
Example #3
0
        public void StoreFile(string recordId, string fileId, string fileUri)
        {
            var effectiveFile = GetEncryptedFileUri(recordId, fileId);

            var fileBytes      = DataGateway.GetBytes(fileUri);
            var encryptedBytes = Cryptor.GetEncryptedBytes(fileBytes, _password);

            DataGateway.PutBytes(effectiveFile, encryptedBytes);
        }