File 3322-Correct-spec-for-Seed.patch of Package erlang

From 906a381271b197391a3d05b6a39629f84ec4c7a1 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Fri, 28 Nov 2025 16:49:43 +0100
Subject: [PATCH 2/7] Correct spec for Seed

---
 lib/crypto/src/crypto.erl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 675d7d4b74..dcfe7f5968 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -2264,7 +2264,7 @@ FloatValue = rand:uniform().     % again
 """.
 -doc(#{title => <<"Plug-In Generators">>,
        since => <<"OTP-22.0">>}).
--spec rand_seed_alg(Alg :: 'crypto_aes', Seed :: term()) ->
+-spec rand_seed_alg(Alg :: 'crypto_aes', Seed :: iodata()) ->
           {rand:alg_handler(),
            atom() | rand_cache_seed()}.
 rand_seed_alg(Alg, Seed) ->
@@ -2373,7 +2373,7 @@ can be changed from its default value using the
 """.
 -doc(#{title => <<"Plug-In Generators">>,
        since => <<"OTP 22.0">>}).
--spec rand_seed_alg_s(Alg :: 'crypto_aes', Seed :: term()) ->
+-spec rand_seed_alg_s(Alg :: 'crypto_aes', Seed :: iodata()) ->
           {rand:alg_handler(),
            atom() | rand_cache_seed()}.
 rand_seed_alg_s(Alg, Seed) when is_atom(Alg) ->
@@ -2423,8 +2423,8 @@ rand_cache_size() ->
     end.
 
 -doc false.
-rand_plugin_next(Seed) ->
-    {strong_rand_range(1 bsl 64), Seed}.
+rand_plugin_next(State) ->
+    {strong_rand_range(1 bsl 64), State}.
 
 -doc false.
 rand_plugin_uniform(State) ->
-- 
2.51.0

openSUSE Build Service is sponsored by