OSDN Git Service

Add files via upload
authorKazuki Suzuki Przyborowski <kazuki.przyborowski@gmail.com>
Thu, 29 Mar 2018 05:45:12 +0000 (00:45 -0500)
committerGitHub <noreply@github.com>
Thu, 29 Mar 2018 05:45:12 +0000 (00:45 -0500)
inc/admin/main.php
inc/members.php
inc/misc/functions.php
inc/profilemain.php
setup/mkconfig.php
setup/setup.php
sql.php

index 949e530..1931233 100644 (file)
@@ -676,6 +676,14 @@ if(in_array("md2",hash_algos())) { ?>
 <option<?php if($Settings['use_hashtype']=="sha384") { echo " selected=\"selected\""; } ?> value="sha384">SHA384</option>
 <?php } if(in_array("sha512",hash_algos())) { ?>
 <option<?php if($Settings['use_hashtype']=="sha512") { echo " selected=\"selected\""; } ?> value="sha512">SHA512</option>
+<?php } if(in_array("sha3-sha224",hash_algos())) { ?>
+<option<?php if($Settings['use_hashtype']=="sha3224") { echo " selected=\"selected\""; } ?> value="sha3224">SHA3-224</option>
+<?php } if(in_array("sha3-sha256",hash_algos())) { ?>
+<option<?php if($Settings['use_hashtype']=="sha3256") { echo " selected=\"selected\""; } ?> value="sha3256">SHA3-256</option>
+<?php } if(in_array("sha3-sha384",hash_algos())) { ?>
+<option<?php if($Settings['use_hashtype']=="sha3384") { echo " selected=\"selected\""; } ?> value="sha3384">SHA3-384</option>
+<?php } if(in_array("sha3-sha512",hash_algos())) { ?>
+<option<?php if($Settings['use_hashtype']=="sha3512") { echo " selected=\"selected\""; } ?> value="sha3512">SHA3-512</option>
 <?php } if(in_array("ripemd128",hash_algos())) { ?>
 <option<?php if($Settings['use_hashtype']=="ripemd128") { echo " selected=\"selected\""; } ?> value="ripemd128">RIPEMD128</option>
 <?php } if(in_array("ripemd160",hash_algos())) { ?>
@@ -1055,6 +1063,10 @@ if($_POST['PassHashType']!="md2"&&
    $_POST['PassHashType']!="sha256"&&
    $_POST['PassHashType']!="sha384"&&
    $_POST['PassHashType']!="sha512"&&
+   $_POST['PassHashType']!="sha3224"&&
+   $_POST['PassHashType']!="sha3256"&&
+   $_POST['PassHashType']!="sha3384"&&
+   $_POST['PassHashType']!="sha3512"&&
    $_POST['PassHashType']!="ripemd128"&&
    $_POST['PassHashType']!="ripemd160"&&
    $_POST['PassHashType']!="ripemd256"&&
index 0fc8937..793b299 100644 (file)
@@ -1147,6 +1147,10 @@ if($HashType=="iDBH224") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedP
 if($HashType=="iDBH256") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha256"); }
 if($HashType=="iDBH384") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha384"); }
 if($HashType=="iDBH512") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha512"); }
+if($HashType=="iDBH3224") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha3-224"); }
+if($HashType=="iDBH3256") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha3-256"); }
+if($HashType=="iDBH3384") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha3-384"); }
+if($HashType=="iDBH3512") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha3-512"); }
 if($HashType=="iDBHRMD128") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd128"); }
 if($HashType=="iDBHRMD160") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd160"); }
 if($HashType=="iDBHRMD256") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd256"); }
@@ -1194,6 +1198,14 @@ if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha384"); }
 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha512"); }
+if($Settings['use_hashtype']=="sha3224") { $iDBHash = "iDBH3224";
+$NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha3-224"); }
+if($Settings['use_hashtype']=="sha3256") { $iDBHash = "iDBH3256";
+$NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha3-256"); }
+if($Settings['use_hashtype']=="sha3384") { $iDBHash = "iDBH3384";
+$NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha3-384"); }
+if($Settings['use_hashtype']=="sha3512") { $iDBHash = "iDBH3512";
+$NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha3-512"); }
 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd128"); }
 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
@@ -1799,6 +1811,14 @@ if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha384"); }
 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha512"); }
+if($Settings['use_hashtype']=="sha3224") { $iDBHash = "iDBH3224";
+$NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha3-224"); }
+if($Settings['use_hashtype']=="sha3256") { $iDBHash = "iDBH3256";
+$NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha3-256"); }
+if($Settings['use_hashtype']=="sha3384") { $iDBHash = "iDBH3384";
+$NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha3-384"); }
+if($Settings['use_hashtype']=="sha3512") { $iDBHash = "iDBH3512";
+$NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha3-512"); }
 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd128"); }
 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
index 5bc0d0f..6f71cf7 100644 (file)
@@ -430,6 +430,14 @@ if(in_array("sha384",hash_algos())&&!function_exists("sha384")) {
 function sha384($data) { return hash("sha384",$data); } }
 if(in_array("sha512",hash_algos())&&!function_exists("sha512")) { 
 function sha512($data) { return hash("sha512",$data); } }
+if(in_array("sha3-224",hash_algos())&&!function_exists("sha3-224")) { 
+function sha3224($data) { return hash("sha3-224",$data); } }
+if(in_array("sha3-256",hash_algos())&&!function_exists("sha3-256")) { 
+function sha3256($data) { return hash("sha3-256",$data); } }
+if(in_array("sha3-384",hash_algos())&&!function_exists("sha3-384")) { 
+function sha3384($data) { return hash("sha3-384",$data); } }
+if(in_array("sha3-512",hash_algos())&&!function_exists("sha3-512")) { 
+function sha3512($data) { return hash("sha3-512",$data); } }
 if(in_array("ripemd128",hash_algos())&&!function_exists("ripemd128")) { 
 function ripemd128($data) { return hash("ripemd128",$data); } }
 if(in_array("ripemd160",hash_algos())&&!function_exists("ripemd160")) { 
index c2d4d5b..80c33e4 100644 (file)
@@ -1172,6 +1172,14 @@ if($OldHashType=="iDBH384") {
        $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha384"); }
 if($OldHashType=="iDBH512") { 
        $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha512"); }
+if($OldHashType=="iDBH3224") { 
+       $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha3-224"); }
+if($OldHashType=="iDBH3256") { 
+       $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha3-256"); }
+if($OldHashType=="iDBH3384") { 
+       $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha3-384"); }
+if($OldHashType=="iDBH3512") { 
+       $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha3-512"); }
 if($OldHashType=="iDBHRMD128") { 
        $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd128"); }
 if($OldHashType=="iDBHRMD160") { 
@@ -1213,6 +1221,14 @@ if($YourPassword!=$OldPassword) { $Error="Yes"; ?>
        $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha384"); }
        if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
        $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha512"); }
+       if($Settings['use_hashtype']=="sha3224") { $iDBHash = "iDBH3224";
+       $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha3-224"); }
+       if($Settings['use_hashtype']=="sha3256") { $iDBHash = "iDBH3256";
+       $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha3-256"); }
+       if($Settings['use_hashtype']=="sha3384") { $iDBHash = "iDBH3384";
+       $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha3-384"); }
+       if($Settings['use_hashtype']=="sha3512") { $iDBHash = "iDBH3512";
+       $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha3-512"); }
        if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
        $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd128"); }
        if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
index 34c44d4..c815c73 100644 (file)
@@ -187,6 +187,10 @@ if($_POST['usehashtype']!="md2"&&
    $_POST['usehashtype']!="sha256"&&
    $_POST['usehashtype']!="sha384"&&
    $_POST['usehashtype']!="sha512"&&
+   $_POST['usehashtype']!="sha3224"&&
+   $_POST['usehashtype']!="sha3256"&&
+   $_POST['usehashtype']!="sha3384"&&
+   $_POST['usehashtype']!="sha3512"&&
    $_POST['usehashtype']!="ripemd128"&&
    $_POST['usehashtype']!="ripemd160"&&
    $_POST['usehashtype']!="ripemd256"&&
@@ -201,6 +205,10 @@ if($_POST['usehashtype']=="sha224") { $iDBHashType = "iDBH224"; }
 if($_POST['usehashtype']=="sha256") { $iDBHashType = "iDBH256"; }
 if($_POST['usehashtype']=="sha384") { $iDBHashType = "iDBH384"; }
 if($_POST['usehashtype']=="sha512") { $iDBHashType = "iDBH512"; }
+if($_POST['usehashtype']=="sha3224") { $iDBHashType = "iDBH3224"; }
+if($_POST['usehashtype']=="sha3256") { $iDBHashType = "iDBH3256"; }
+if($_POST['usehashtype']=="sha3384") { $iDBHashType = "iDBH3384"; }
+if($_POST['usehashtype']=="sha3512") { $iDBHashType = "iDBH3512"; }
 if($_POST['usehashtype']=="ripemd128") { $iDBHashType = "iDBHRMD128"; }
 if($_POST['usehashtype']=="ripemd160") { $iDBHashType = "iDBHRMD160"; }
 if($_POST['usehashtype']=="ripemd256") { $iDBHashType = "iDBHRMD256"; }
index b04b7ce..bd1bb72 100644 (file)
@@ -242,6 +242,14 @@ if(in_array("md2",hash_algos())) { ?>
 <option value="sha384">SHA384</option>
 <?php } if(in_array("sha512",hash_algos())) { ?>
 <option value="sha512">SHA512</option>
+<?php } if(in_array("sha3-224",hash_algos())) { ?>
+<option value="sha3224">SHA3-224</option>
+<?php } if(in_array("sha3-256",hash_algos())) { ?>
+<option value="sha3256">SHA3-256</option>
+<?php } if(in_array("sha3-384",hash_algos())) { ?>
+<option value="sha3384">SHA3-384</option>
+<?php } if(in_array("sha3-512",hash_algos())) { ?>
+<option value="sha3512">SHA3-512</option>
 <?php } if(in_array("ripemd128",hash_algos())) { ?>
 <option value="ripemd128">RIPEMD128</option>
 <?php } if(in_array("ripemd160",hash_algos())) { ?>
diff --git a/sql.php b/sql.php
index df40f16..b42abf1 100644 (file)
--- a/sql.php
+++ b/sql.php
@@ -244,6 +244,10 @@ if($Settings['use_hashtype']!="md2"&&
    $Settings['use_hashtype']!="sha256"&&
    $Settings['use_hashtype']!="sha384"&&
    $Settings['use_hashtype']!="sha512"&&
+   $Settings['use_hashtype']!="sha3224"&&
+   $Settings['use_hashtype']!="sha3256"&&
+   $Settings['use_hashtype']!="sha3384"&&
+   $Settings['use_hashtype']!="sha3512"&&
    $Settings['use_hashtype']!="ripemd128"&&
    $Settings['use_hashtype']!="ripemd160"&&
    $Settings['use_hashtype']!="ripemd256"&&