Skip to content

chore: Undeprecated ISecureRandom - #63412

Open
CarlSchwan wants to merge 1 commit into
masterfrom
carl/undeprecated-isecurerandom
Open

chore: Undeprecated ISecureRandom#63412
CarlSchwan wants to merge 1 commit into
masterfrom
carl/undeprecated-isecurerandom

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

  • This makes it easy to mock randomness in unit tests as ISecureRandom is a service.
  • The default list of character would then need to be copied everywhere
  • This is used all other the place

See also comment from @nickvergessen #61538 (comment)

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

- This makes it easy to mock randomness in unit tests as ISecureRandom
  is a service.
- The default list of character would then need to be copied everywhere
- This is used all other the place

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan CarlSchwan added this to the Nextcloud 35 milestone Aug 19, 2026
@CarlSchwan CarlSchwan self-assigned this Aug 19, 2026
@CarlSchwan
CarlSchwan requested a review from a team as a code owner August 19, 2026 12:11
@CarlSchwan
CarlSchwan requested review from Altahrim, icewind1991, leftybournes and sorbaugh and removed request for a team August 19, 2026 12:11
* @since 8.0.0
* @deprecated 35.0.0 Use {@see Randomizer::getBytesFromString()} available in PHP 8.3+ instead.
*/
public function generate(int $length,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead this could just make use of the randomizer (if it is not already doing it)

@susnux susnux added 3. to review Waiting for reviews php Pull requests that update Php code labels Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants