File: assignopaque.t

package info (click to toggle)
libtie-encryptedhash-perl 1.24-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 136 kB
  • sloc: perl: 555; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl -s
##
## Copyright (c) 2000, 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: assignopaque.t,v 1.1 2000/08/31 16:31:00 vipul Exp vipul $

use lib '../lib';
use lib 'lib';
use Tie::EncryptedHash;

print "1..1\n";
my %h = ();
tie %h, Tie::EncryptedHash, 'Blacksun', 'Blowfish';

$h{_enc} = "hush hush";
delete $h{__password};
$u = $h{_enc};

my %g = ();
tie %g, Tie::EncryptedHash; 
$g{_secret} = $u;
$g{__password} = 'Blacksun';
print $g{_secret} =~ /hush hush/ ? "ok 1\n" : "not ok 1\n";