Number of online resources offering free remote storage facilities has seriously increased in the recent time and it continue to grow taking a good share from the Dropbox's marketspace. Dropbox has been on the cloud storage market since the early days but for many people a proprietary client offered by Dropbox is not acceptable. There are of course attempts to overcome such a drawback by implementing an open source client that is configurable to use different types of cloud storage facilities transparently to the user. An example for such a client is syncany.org. I've been waiting for the syncany.org project to reach a mature state for months but it seems like they are not making it in the near future. So I started to look for other possibilities to utilize cloud storage facilities using only standard means available on the operating system's level that would require no dedicated client to be installed. The rest of the article is devoted mainly to users of Unix-like OS's but there is a section in the end explaining how to mount and encrypt WebDAV resources on Windows platform.
Thoughts and ideas about programming, scripting, automation, electronics, gadgets, web and technology
Showing posts with label encrypting. Show all posts
Showing posts with label encrypting. Show all posts
Saturday, June 2, 2012
Thursday, March 3, 2011
Encrypting with the openssl in bash
With a bit of commandlinefu it becomes easy to encrypt and decrypt files with the strong 256 bit aes algorithm using openssl.
Add the following into your ~/.bashrc
# crypting functions
function encrypt {
if [ -t 0 ]; then
# interactive
local fname="$1"
shift
openssl aes-256-cbc -salt -in "$fname" -out "${fname}.enc" $@
else
# piped
perl -e 'use IO::Select; $ready=IO::Select->new(STDIN)->can_read();'
openssl aes-256-cbc -salt $@
fi
}
function decrypt {
if [ -t 0 ]; then
# interactive
local fname="$1"
shift
openssl aes-256-cbc -d -in "$fname" -out "${fname%\.*}" $@
else
perl -e 'use IO::Select; $ready=IO::Select->new(STDIN)->can_read();'
openssl aes-256-cbc -d $@
fi
}
and source it to let changes take effect (source ~/.bashrc).
Labels:
bash,
encrypting,
openssl
Subscribe to:
Posts (Atom)