summaryrefslogtreecommitdiff
path: root/cpan/dist/Crypt-TripleDES/examples/deswrapper
blob: 3e8ce3acdcadc4f14d696a5f89fa12ed2cfb31ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl -s
##
##
##
## Copyright (c) 1999, Vipul Ved Prakash.  All rights reserved.
## This code is free software; you can redistribute it and/or modify
## it under the same terms as Perl itself.
##
## $Id$


use Crypt::TripleDES; 

my $des = new Crypt::TripleDES; 
die "syntax: $0 -e|-d -pass=passphrase datafile\n" unless $pass; 
$data = join'',<>; 
print $des->encrypt3 ( $data, $pass ) if $e; 
print $des->decrypt3 ( $data, $pass ) if $d;