Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Foren / Craftwork / Server-side / owencrypt - One way encyption class

magneum3
#1 19. März 2009, 21:27
This is a one way encryption class that I made. Each string you give it will return a totally unique string of only numbers. This string cannot be decrypted and is a good substitute for MD5 encryption.

function owencrypt($text){$text = strtoupper($text);$text = str_word_count($text) . str_rot13($text);$text = addslashes($text);$text = sha1($text);$text = base64_encode($text);$text = convert_uuencode($text);$text = md5($text);$text = bin2hex($text);$text = strlen($text).$text;$text = strrev($text);return $text;}

an example of using this
$string = "This is the string that will be encoded!";
$encodedstring = owencrypt($string);
echo $encodedstring;
this will return:
332353362346934363036336935646734623431646267383665323166323832646
oc
#2 19. März 2009, 21:52
Very inessential.

All you do is combining existing algorithms, it is also slow because you encode bigger and bigger strings consecutively. It is no more secure considering we know the code path. So, a number/letter/[*-=?%&{}] MD5 hash is a lot better.
Kilandor
#3 20. März 2009, 12:22
Correct, this is in no way itself an encryption. Nor is it a "class" its a function
Its just a bunch of crap all piled together.

As oc said, this is no more secure than doing sha1 and md5 together, other than the fact you basicly did a salt with it first.

A simple sha1 or md5 + salt would be secure enough, or sha1+md5 together
urlkiller
#4 29. August 2010, 04:27
just... don't do encoding / decoding software in php *_*'' way to unsecure.
ok ist a bit fun but dont very secure because you would need to use matrix-calculation and other de/encryption algoritms and not these because they are just too well documented and COULD be reversed.
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
GHengeveld
#5 29. August 2010, 06:17
Although it is a very interesting topic (meaning the subject of cryptography), I don't see why this is relevant to Cotonti.

As others have said before me, you're basically combining various existing encryption techniques and adding a salt. This will hardly result in anything more secure than current encryption standards (s.a. MD5 or SHA1).

As urlkiller mentioned, PHP isn't suitable for stuff like this. In my opinion, when you need anything better than MD5, you're better off using another programming language (I would recommend you try Malbolge).
Kilandor
#6 29. August 2010, 10:12
This thread was over a year and a half old :)

Dieses Thema ist gesperrt, neue Beiträge sind nicht erlaubt.