private Record GetRecordFromUri(string recordFileUri) { var encryptedBytes = DataGateway.GetBytes(recordFileUri); var record = Cryptor.GetDecryptedContent <Record>(encryptedBytes, _password); return(record); }
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); }
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); }