From 2d01f68d7895c8fb5138f06375795fcb69855a62 Mon Sep 17 00:00:00 2001 From: Timothy Legge Date: Thu, 26 Feb 2026 20:12:13 -0400 Subject: [PATCH] Replace Data::Rand::Obscure with Crypt::SysRandom --- Build.PL | 2 +- Changes | 4 ++++ META.json | 2 +- META.yml | 2 +- lib/Net/NSCA/Client/InitialPacket.pm | 8 +++----- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Build.PL b/Build.PL index d27da65..c8549db 100644 --- a/Build.PL +++ b/Build.PL @@ -41,7 +41,7 @@ my $build = Module::Build->new( 'perl' => '5.008001', 'Const::Fast' => 0, 'Convert::Binary::C' => '0.74', - 'Data::Rand::Obscure' => '0.020', + 'Crypt::SysRandom' => '0.007', 'Data::Validate::Domain' => '0.02', 'Digest::CRC' => 0, 'English' => 0, diff --git a/Changes b/Changes index 996d26b..d327ff4 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl 5 distribution Net-NSCA-Client +TBD + [BUG FIXES] + - Use Crypt::SysRandom instead of Data::Rand::Obscure + 0.009002 2011-10-24 [BUG FIXES] - Changed the shebang for the send_nsca script so on install, it will be diff --git a/META.json b/META.json index ae0a0d0..c66dfe6 100644 --- a/META.json +++ b/META.json @@ -42,7 +42,7 @@ "requires" : { "Const::Fast" : 0, "Convert::Binary::C" : "0.74", - "Data::Rand::Obscure" : "0.020", + "Crypt::SysRandom" : "0.007", "Data::Validate::Domain" : "0.02", "Digest::CRC" : 0, "English" : 0, diff --git a/META.yml b/META.yml index c5020d9..19a03aa 100644 --- a/META.yml +++ b/META.yml @@ -53,7 +53,7 @@ provides: requires: Const::Fast: 0 Convert::Binary::C: 0.74 - Data::Rand::Obscure: 0.020 + Crypt::SysRandom: 0.007 Data::Validate::Domain: 0.02 Digest::CRC: 0 English: 0 diff --git a/lib/Net/NSCA/Client/InitialPacket.pm b/lib/Net/NSCA/Client/InitialPacket.pm index 589cf35..5181e41 100644 --- a/lib/Net/NSCA/Client/InitialPacket.pm +++ b/lib/Net/NSCA/Client/InitialPacket.pm @@ -20,7 +20,7 @@ use Net::NSCA::Client::Library 0.009 qw(Bytes); ############################################################################### # MODULES -use Data::Rand::Obscure 0.020; +use Crypt::SysRandom 'random_bytes'; use Net::NSCA::Client::ServerConfig (); use Net::NSCA::Client::Utils qw(initialize_moose_attr_early); @@ -116,9 +116,7 @@ sub to_string { sub _build_initialization_vector { my ($self) = @_; - return Data::Rand::Obscure::create_bin( - length => $self->server_config->initialization_vector_length, - ); + return random_bytes($self->server_config->initialization_vector_length); } sub _build_raw_packet { my ($self) = @_; @@ -259,7 +257,7 @@ string representation is what will be sent over the network. =over -=item * L 0.020 +=item * L 0.007 =item * L 0.89