# # spec file for package perl-Crypt-Random-TESHA2 (Version 0.02) # # Copyright (c) 124 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Crypt-Random-TESHA2 Name: perl-Crypt-Random-TESHA2 Version: 0.02 Release: 0 License: Artistic-1.0 or GPL-1.0-or-later Summary: Random numbers using timer/schedule entropy, aka userspace voodoo entropy Url: https://metacpan.org/release/%{cpan_name} Source0: Crypt-Random-TESHA2-0.02.tar.gz BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl-generators BuildRequires: perl(Digest::SHA) >= 5.22 BuildRequires: perl(Time::HiRes) >= 1.9711 Requires: perl(Digest::SHA) >= 5.22 Requires: perl(Time::HiRes) >= 1.9711 %{perl_requires} %description Generate random numbers using entropy gathered from timer / scheduler jitter. This can be used to generate non-pseudorandom data to seed a PRNG (e.g. 'srand'/'rand', Math::Random::MT, etc.) or CSPRNG (e.g. AES-CTR or Math::Random::ISAAC). You may use it directly or as part of a random source module that first checks for O/S randomness sources such as Crypt::Random::Seed. Only Perl CORE modules are used, making this very portable. However, systems must have both 'usleep' and the high resolution timer interface from Time::HiRes. At installation time, measurements are taken of the estimated entropy gathered by the timer differences. If the results indicated we could not get good results, then the module will consider itself "weak". On the first use of any of the functions that return randomness (e.g. random_bytes), the module will carp about not being a strong randomness source. However, two special options, ":strong" and ":weak" may be given to the importer to change this behavior. If ":strong" is used, then the module will croak. If ":weak" is used, then no carp will be generated. The function 'is_strong' can be used at any time for finer control. Most desktop UNIX/Windows machines will give strong results from this method. %prep %autosetup -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes examples README TODO %license LICENSE %changelog