Using...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using...

    how this encryption works? it can be generated with php or not? it is stronger then md5, sha1 using 120bit encryption, md5 32, so im wondering, it can be generated with php? or maybe sha256?

    Edit:

    ok. i found this script

    Code:
    <?php 
    
    function encryptData($string,$type) { 
            if($type == &#39;SHA256&#39;) // See if they have selected to use SHA256 encryption. 
                    { 
                            // Use MHash to encrypt the string with SHA256. 
                            $encryptedstring = bin2hex(mhash(MHASH_SHA256,$string)); 
                            echo $encryptedstring; 
                    } 
                    else 
                    { 
                            if($type == &#39;SHA1&#39;) // See if they have selected to use SHA1 encryption. 
                                    { 
                                            // Encrypt the string with md5, sha1 and base64 
                                            $encryptedstring = sha1(base64_encode($string)); 
                                            echo $encryptedstring; 
                                    } 
                                    else 
                                    { 
                                            if($type == &#39;MD5&#39;) // See if they have selected to use MD5 encrpytion. 
                                                    { 
                                                            // Encrypt with md5 and base64. 
                                                            $encryptedstring = md5(base64_encode($string)); 
                                                            echo $encryptedstring; 
                                                    } 
                                                    else 
                                                    { 
                                                            // If the $type variable is incorrect echo an error. 
                                                            echo &#39;You have not specified a valid encryption method.  Those available are SHA256, SHA1 and MD5, note the capitals, they are required.&#39;; 
                                                    } 
                                    } 
                    } 
    } 
    ?>
    so i got some idea, we can create a encryption service script example,
    Code:
    Text to encrypt:
    <input name="string" type="text" maxlength="50" emptyok="true"/>
    
    
    Select Hash:
    
    <select>
      <option value="md5">MD5</option>
      <option value="sha1">SHA1</option>
      <option value="sha256">SHA256</option>
     </select>
    <anchor>Encypt
    <go method="post" href="encryptor.php">
    
    <postfield name="string" value="$(string)"/>
    <postfield name="type" value="$(type)"/>
    
    </go>
    </anchor>
    where the encryptor.php is script with encrypt function...

    this is just an example, i&#39;ll try to make one... and i think that this is good service script

    #2
    here is the encrypt script...

    Code:
    <?php
    header("Content-type: text/vnd.wap.wml");
    print &#39;<?xml version="1.0" encoding="UTF-8"?>&#39;;
    print &#39;<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.dtd">&#39;;
    ##################################################
    if(isset($_GET[&#39;go&#39;]) && $_GET[&#39;go&#39;] == &#39;encrypt&#39;)
       {
    ?>
    
    <wml>
    <card id="result" title="SHA256 Encryptor - Result">
    <p align="center">
    [size="1"]
    
    <?
    $sha256 = bin2hex(mhash(MHASH_SHA256,$string));
    $sha1 = sha1(base64_encode($string));
    $md5 = md5(base64_encode($string));
    ?>
    
    
    Encrypted String 
    
    
    <small>
    SHA256:
    
    [b]<?print("$sha256")?>[/b]
    
    
    
    SHA1:
    
    [b]<?print("$sha1")?>[/b]
    
    
    
    MD5:
    
    [b]<?print("$md5")?>[/b]
    
    
    
    
    [/size]
    [url="<?$PHP_SELF;?>?"]Back[/url]
    
    
    </small>
    </p>
    </card>
    </wml>
    <?php
          exit;
    }
    ?>
    
    <wml>
    <card id="index"  title="SHA256 Encryptor">
    
    <p align="center">
    
    [size="1"]
    Hash Encryptor, Encrypt Passwords, Words, Etc...
    
    
    
    [b]String To Encrypt:[/b]
    [/size]
    
    <input name="string" type="text" maxlength="50" emptyok="true"/>
    
    
    <anchor>[size="1"]Encrypt[/size]
    <go method="post" href="<?$PHP_SELF?>?go=encrypt&amp;string=$(string)">
    
    <postfield name="string" value="$(string)"/>
    
    </go>
    </anchor>
    
    </p>
    
    
    </card>
    </wml>

    Comment

    Working...
    X