m.seaman at infracaninophile.co.uk
Wed Dec 22 14:32:08 UTC 2010
On 22/12/2010 14:20, Mohammad Hedayati wrote:
> Can anyone please show me a sample code for ciphering using DES in FreeBSD?
To encrypt, something like:
openssl enc -e -des -in plaintext.txt -a -out encrypted.asc
Decrypt like so:
openssl enc -d -dex -in encrypted.asc -a -out plaintext.txt
Note: completely untested. You may well need to supply various extra
arguments to make it all work. See 'openssl enc help' for hints.
Note 2: DES is pretty trivial to crack nowadays. Don't use this for
anything serious. You can encrypt using AES or any of a host of other
ciphers by using a very similar openssl command line.
Note 3: If you're actually after DES "encrypted" passwords, then see
crypt(3). From the commandline you can use the Perl crypt function:
'perldoc -f crypt' for details.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matthew at infracaninophile.co.uk Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20101222/f64c2fab/signature.pgp
More information about the freebsd-questions