Name: data-hd-export
Owner: Center for Data Driven Discovery in Biomedicine
Description: null
Created: 2017-03-13 21:07:43.0
Updated: 2017-03-13 21:07:47.0
Pushed: 2017-03-13 21:15:16.0
Homepage: null
Size: 3
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
generate key
ssl rand -base64 256 > $outputdir/encryption.key
d 400 $outputdir/encryption.key
aes encryption
ssl aes-256-cbc -salt -in $input -out $output -pass file:$encryption.key
decryption
ssl aes-256-cbc -d -in $input -out $output -pass file:$encryption.key
usage:
and.sh enc manifest_file output_dir # encryption
and.sh dec manifest_file encryption_key output_dir #decryption
manifest_file
is a list of files with relative dir path, something like the output from ls
er1/file1.fq
er1/file2.fq
er2/file3.fq
er2/file4.fq
The script will auto-md5sum original files and encrypted files at the same time.
The tree
will be like:
folder1
??? file1.fq
??? file2.fq
folder2
??? file3.fq
??? file4.fq
manifest
output_folder
??? folder1
? ??? file1.fq
? ??? file2.fq
??? folder2
? ??? file3.fq
? ??? file4.fq
??? encryption.key
??? manifest
??? md5sum.encrypted.txt
??? md5sum.original.txt