Files
perl-Crypt-Random-TESHA2/perl-Crypt-Random-TESHA2.spec
2025-08-12 18:12:52 +02:00

87 lines
3.1 KiB
RPMSpec

#
# spec file for package perl-Crypt-Random-TESHA2
#
# Copyright (c) 2024 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.10.0
Release: 0
# 0.01 -> normalize -> 0.10.0
%define cpan_version 0.01
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: https://cpan.metacpan.org/authors/id/D/DA/DANAJ/%{cpan_name}-%{cpan_version}.tar.gz
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Digest::SHA) >= 5.22
BuildRequires: perl(Time::HiRes) >= 1.9711
Requires: perl(Digest::SHA) >= 5.22
Requires: perl(Time::HiRes) >= 1.9711
Provides: perl(Crypt::Random::TESHA2) = %{version}
Provides: perl(Crypt::Random::TESHA2::Config) = %{version}
%undefine __perllib_provides
%{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.
Only Perl CORE modules are used, making this very portable. However,
systems must have a high resolution timer and support 'usleep' 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. Note that this should be an
unusual case, and neither flag has any effect if the module considers
itself strong.
%prep
%autosetup -n %{cpan_name}-%{cpan_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