#!/usr/local/bin/perl -w -I..

#
# Copyright (C) 1995, 1996 Systemics Ltd (http://www.systemics.com/)
# All rights reserved.
#

use Stream::IO;
use PGP::PacketFactory;

my $fis = new Stream::FileInput "/home/inka/secring.pgp";
# my $fis = new Stream::FileInput "/home/TheCrypt/data/joe/keys/secring.pgp";
my $dis = new Stream::DataInput $fis;

my $skc = PGP::PacketFactory::restore($dis);
die $skc unless ref($skc);

my $count = 0;
my $key = "enas";
for(;;)
{
	$key = "enas$count";
	my $sk = $skc->decrypt("$key");
	if (ref $sk)
	{
		print "Got it - [$key]\n";
		last;
	}
	if ($count++ == 100)
	{
		print "$key\n";
		$count = 0;
	}
	$key++;
}
