Hey all
I was wondering if there is a way to ready a file that has been encrypted using crypt()
I created a file from php code called license.lbi
and in teh code that create the file i have crypt($site_url);
$site_url = http://www.mydomain.com
now when the file is created its encrypted now is there a way to chk the created file for the url like if i was at mydomain.com and when it chks the file it will see it matches and do nothing but if i was trying to use the script one another domain then what is in the license file it would come up with a error.
I just need to know if there is a way to do this or should i try this another way.
file encryption
Moderator: General Moderators
- arrielmabale
- Forum Newbie
- Posts: 15
- Joined: Fri Aug 13, 2010 3:57 pm
- Location: Dubai
Re: file encryption
If it is from server to server communication, I think you can achieve this trough web services (SOAP in php).
Re: file encryption
Taking your words at face-value: no. You can't. It even says so right on the manual page:nite4000 wrote:I was wondering if there is a way to ready a file that has been encrypted using crypt()
Why? crypt() is not encryption. It is hashing, just like md5() and sha1().Note: There is no decrypt function, since crypt() uses a one-way algorithm.
Putting that aside, with the default DES-based hashing algorithm only the first 8 characters in the input are used. Everything else is ignored. That means hashing "http://www.mydomain.com" and "http://wASKLDJHASKLDJHAS" will produce the same output given the same salt. You can fix this by providing your own salt generated according to the rules for one of the other support algorithms.