summaryrefslogtreecommitdiffstats
path: root/lib/public/security
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-09-03 11:03:27 +0200
committerLukas Reschke <lukas@owncloud.com>2014-09-03 11:03:27 +0200
commit50b430ee7cadd6be1520d63acdac27bc06581e09 (patch)
treec5ab65b1ac3e845bac58a452465f414584940758 /lib/public/security
parent3329e0f2b22207a24ddb4953bbf11964b23682d9 (diff)
downloadnextcloud-server-50b430ee7cadd6be1520d63acdac27bc06581e09.tar.gz
nextcloud-server-50b430ee7cadd6be1520d63acdac27bc06581e09.zip
Add char consts, hash the specified password for the HMAC
Diffstat (limited to 'lib/public/security')
-rw-r--r--lib/public/security/isecurerandom.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/security/isecurerandom.php b/lib/public/security/isecurerandom.php
index ae6e1d58451..8856b457804 100644
--- a/lib/public/security/isecurerandom.php
+++ b/lib/public/security/isecurerandom.php
@@ -21,6 +21,14 @@ namespace OCP\Security;
interface ISecureRandom {
/**
+ * Flags for characters that can be used for <code>generate($length, $characters)</code>
+ */
+ const CHAR_UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz';
+ const CHAR_DIGITS = '0123456789';
+ const CHAR_SYMBOLS = 'CHAR_SYMBOLS';
+
+ /**
* Convenience method to get a low strength random number generator.
*
* Low Strength should be used anywhere that random strings are needed