2009/10/19 Kprasad <kpra...@aptaracorp.com>:
> Can I encrypt our perl script by using these codes?
> I need suggestion that it's safe or not do encrypt and decrypt our .pl or
> .plx file with this code.

Who do you want to hide it from? Someone who gets the code?

> my $obscure =  pack("u",$_);
> my $unobscure = unpack(chr(ord("a") + 19 + print ""),$obscure);

First of all, this text is uuencoded, not encrypted. See:
http://en.wikipedia.org/wiki/Uuencoding
This encoding is used for sending binary data over text links, not for
encryption.

Even if the value of (chr(ord("a") + 19 + print "") was hard to guess
- and it isn't, it's basically 19th letter after "a" and then one next
- it wouldn't matter because pack/unpack don't have that many options
for encoding strings of text, and even if it did you still have to
include something that evaluates to the correct value in your code
that enyone can evaluate to see what that secret value is without even
any need to understand the code used to hide it.

Rafał Pocztarski
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to