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

#1 2009-03-19 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:
#2 2009-03-19 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.
#3 2009-03-20 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
#4 2010-08-29 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="!7AD5C7">!7AD5C7</a>
#5 2010-08-29 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).
#6 2010-08-29 10:12
This thread was over a year and a half old :)

This topic is locked, new posts are not allowed.