compressAndEncryptFolder: Compress and encrypt a folder

View source: R/Encryption.R

compressAndEncryptFolderR Documentation

Compress and encrypt a folder

Description

Compress and encrypt a folder

Usage

compressAndEncryptFolder(sourceFolder, targetFileName, publicKeyFileName)

Arguments

sourceFolder

Name of the folder that must be encrypted.

targetFileName

Name of the file that will hold the encrypted data.

publicKeyFileName

Name of the file where the public key is stored.

Details

Compresses all files in a folder and its subfolders, and encrypts using the provided public key.

Examples

## Not run: 
generateKeyPair("public.key", "private.key")

# Create a folder with some data
dir.create("test")
data <- data.frame(x = runif(1000), y = 1:1000)
saveRDS(data, "test/data1.rds")
saveRDS(data, "test/data2.rds")

compressAndEncryptFolder("test", "data.zip.enc", "public.key")
decryptAndDecompressFolder("data.zip.enc", "test2", "private.key")

## End(Not run)


OHDSI/OhdsiSharing documentation built on Sept. 4, 2023, 3:55 p.m.