Skip to content

Commit 2b29f6b

Browse files
authored
ISecureRandom: use generate directly
getMediumStrengthGenerator is deprecated and will be removed in NC16 nextcloud/server#12907
1 parent b9c6032 commit 2b29f6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Service/OwnpadService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class OwnpadService {
1717

1818
public function create($dir, $padname, $type, $protected) {
1919
// Generate a random pad name
20-
$token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(16, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_UPPER.\OCP\Security\ISecureRandom::CHAR_DIGITS);
20+
$token = \OC::$server->getSecureRandom()->generate(16, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_UPPER.\OCP\Security\ISecureRandom::CHAR_DIGITS);
2121

2222
$l10n = \OC::$server->getL10N('ownpad');
2323
$l10n_files = \OC::$server->getL10N('files');

0 commit comments

Comments
 (0)