Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / share / doc / cryptsetup / examples / | server ip : 104.21.89.46 your ip : 172.69.130.146 H O M E |
Filename | /usr/share/doc/cryptsetup/examples/gen-ssl-key |
Size | 613 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 10:01 |
Last modified | 02-Nov-2013 00:57 |
Last accessed | 07-Jul-2025 02:41 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/bin/sh
#
# script to generate a keyfile that is encrypted with openssl
#
# Written 2005 by Markus Nass <[email protected]>
# Improved 2006 by Jonas Meurer <[email protected]>
# Further improved 2006 by Markus Nass <[email protected]>
usage() {
echo "Usage: $0 <key>"
exit 1
}
if [ "$1" = "" -o "$1" = "-h" -o "$1" = "--help" ]; then
usage
fi
if [ -x /usr/bin/openssl ]; then
key=`tempfile`
dd if=/dev/random of=$key bs=1c count=256
openssl enc -aes-256-cbc -e -salt -in $key -out $1
#rm -f $key; key=""
shred -uz $key; key=""
else
echo "/usr/bin/openssl is not available" && exit 1
fi
#
# script to generate a keyfile that is encrypted with openssl
#
# Written 2005 by Markus Nass <[email protected]>
# Improved 2006 by Jonas Meurer <[email protected]>
# Further improved 2006 by Markus Nass <[email protected]>
usage() {
echo "Usage: $0 <key>"
exit 1
}
if [ "$1" = "" -o "$1" = "-h" -o "$1" = "--help" ]; then
usage
fi
if [ -x /usr/bin/openssl ]; then
key=`tempfile`
dd if=/dev/random of=$key bs=1c count=256
openssl enc -aes-256-cbc -e -salt -in $key -out $1
#rm -f $key; key=""
shred -uz $key; key=""
else
echo "/usr/bin/openssl is not available" && exit 1
fi