Link to home
Start Free TrialLog in
Avatar of wqclatre
wqclatre

asked on

Help making a decryp routine

If I have a encrypt routine that looks like this:

sub _Password_Encrypt {
        my ($Password) = @_;
        my ($FinishedString);

        my @Pass = split (//, $Password);

        foreach (@Pass){
                $_ = ord($_);
        }

        my @encoding_table = (
                0xf3, 0x26, 0x81, 0xc4,
                0x39, 0x86, 0xdb, 0x92,
                0x71, 0xa3, 0xb9, 0xe6,
                0x53, 0x7a, 0x95, 0x7c);

        for (my $i = 0; $i < length($Password); $i++){
                $FinishedString .= chr($Pass[$i] ^ $encoding_table[$i]);
        }

        return ($FinishedString);
}


How can I make a decrypt routine that decrypt it?
Avatar of Tsvetomir
Tsvetomir

:)) use the same sub
Avatar of wqclatre

ASKER

??
ASKER CERTIFIED SOLUTION
Avatar of Tsvetomir
Tsvetomir

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It was so simple... thanks!
prints :
--------------
Pass now: test
Pass now: ‡Cò°
Pass now: test


/sorry sould be all in one comment only :( /
you are wellcome :)