diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-03 11:03:27 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-03 11:03:27 +0200 |
commit | 50b430ee7cadd6be1520d63acdac27bc06581e09 (patch) | |
tree | c5ab65b1ac3e845bac58a452465f414584940758 /lib/public/security | |
parent | 3329e0f2b22207a24ddb4953bbf11964b23682d9 (diff) | |
download | nextcloud-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.php | 8 |
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 |