projects
/
core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5fa5fc
)
Added hashString() which simply calls mhash() function with SHA256 hash function
author
Roland Häder
<roland@mxchange.org>
Sun, 26 Feb 2012 00:17:22 +0000
(
00:17
+0000)
committer
Roland Häder
<roland@mxchange.org>
Sun, 26 Feb 2012 00:17:22 +0000
(
00:17
+0000)
inc/classes/main/class_BaseFrameworkSystem.php
patch
|
blob
|
history
diff --git
a/inc/classes/main/class_BaseFrameworkSystem.php
b/inc/classes/main/class_BaseFrameworkSystem.php
index cf137a7d3fd345a13eb3062920fb2edab15aebd7..3c9dcb2873050c9944189a95a908fdae6ec95071 100644
(file)
--- a/
inc/classes/main/class_BaseFrameworkSystem.php
+++ b/
inc/classes/main/class_BaseFrameworkSystem.php
@@
-1974,6
+1974,20
@@
class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
// And return it
return $executionTime;
}
+
+ /**
+ * Hashes a given string with a simple but stronger hash function (no salts)
+ *
+ * @param $str The string to be hashed
+ * @return $hash The hash from string $str
+ */
+ public function hashString ($str) {
+ // Hash given string with (better secure) hasher
+ $hash = mhash(MHASH_SHA256, $str);
+
+ // Return it
+ return $hash;
+ }
}
// [EOF]