From 0524cb201d3b91d38d1974740bb712c468dc60a2 Mon Sep 17 00:00:00 2001 From: ljnath Date: Wed, 1 Jan 2025 00:11:47 +0530 Subject: [PATCH] v1.9.0 - added support for .NET 9.0 and changed random seed value to 4 --- LICENSE | 2 +- README.md | 8 ++- RandomString4Net/DataSource.cs | 2 +- RandomString4Net/RandomString.cs | 6 +- RandomString4Net/RandomString4Net.csproj | 68 ++++++++++++++----- .../RandomString4NetTest.csproj | 3 + .../RandomString4NetTesterDotNet.csproj | 2 +- 7 files changed, 66 insertions(+), 25 deletions(-) diff --git a/LICENSE b/LICENSE index 3221057..36bec90 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020-2023 Lakhya Jyoti Nath +Copyright (c) 2020-2025 Lakhya Jyoti Nath Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3780eca..4f8c778 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # RandomString4Net -### Version 1.8.0 +### Version 1.9.0 Author : Lakhya Jyoti Nath (ljnath)
-Date : September 2020 - December 2022 - January 2023 - October 2023 - November 2023
+Date : September 2020 - January 2025
Email : ljnath@ljnath.com
Website : https://www.ljnath.com @@ -46,6 +46,8 @@ etc. etc. * Added support for .NET Standard (>2.0) * Added support for RandomNumberGenerator in .NET 6.0 and higher as RNGCryptoServiceProvider is marked as obsolete * Added support for .NET 8.0 +* Added support for .NET 9.0 +* Updated random seed to 4 (https://github.com/jshergal/) ## Supported Types @@ -114,4 +116,4 @@ Thanks in advance ! ## License -Copyright © 2020-2023 [Lakhya's Innovation Inc.](https://github.com/ljnath/) under the [MIT License](https://github.com/ljnath/RandomString4Net/blob/master/LICENSE). +Copyright © 2020-2025 [Lakhya's Innovation Inc.](https://github.com/ljnath/) under the [MIT License](https://github.com/ljnath/RandomString4Net/blob/master/LICENSE). diff --git a/RandomString4Net/DataSource.cs b/RandomString4Net/DataSource.cs index 3073c62..d093613 100644 --- a/RandomString4Net/DataSource.cs +++ b/RandomString4Net/DataSource.cs @@ -1,7 +1,7 @@ /** * * RandomString4Net - .NET library to generate N random strings of M length from various categories - * Copyright (c) 2020-2023 Lakhya Jyoti Nath + * Copyright (c) 2020-2025 Lakhya Jyoti Nath * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/RandomString4Net/RandomString.cs b/RandomString4Net/RandomString.cs index e8c5e70..1be99d8 100644 --- a/RandomString4Net/RandomString.cs +++ b/RandomString4Net/RandomString.cs @@ -1,7 +1,7 @@ /** * * RandomString4Net - .NET library to generate N random strings of M length from various categories - * Copyright (c) 2020-2023 Lakhya Jyoti Nath + * Copyright (c) 2020-2025 Lakhya Jyoti Nath * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -160,7 +160,7 @@ private static List GetRandomStrings(string[] inputStrings, int count, i if (count <= 0 || maxLength <= 0) throw new InvalidLengthException("Number and length of random strings should be a non-zero postive numbver"); - byte[] randomSeeds = new byte[1]; + byte[] randomSeeds = new byte[4]; #if NET6_0_OR_GREATER RandomNumberGenerator randomNumberGenerator = RandomNumberGenerator.Create(); @@ -172,7 +172,7 @@ private static List GetRandomStrings(string[] inputStrings, int count, i #endif // creating an instance of Random() using the random seed value - Random random = new Random(randomSeeds[0]); + Random random = new Random(BitConverter.ToInt32(randomSeeds, 0)); if (!forceOccuranceOfEachType) return getRandomStrings(random, String.Join("", inputStrings), count, maxLength, randomLength, forceUnique); diff --git a/RandomString4Net/RandomString4Net.csproj b/RandomString4Net/RandomString4Net.csproj index 5692c59..949c292 100644 --- a/RandomString4Net/RandomString4Net.csproj +++ b/RandomString4Net/RandomString4Net.csproj @@ -1,30 +1,66 @@ - net20;net35;net40;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netcoreapp2.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;netstandard2.0;netstandard2.1;net5.0-windows;net6.0-windows;net7.0-windows;net5.0;net6.0;net7.0;net8.0;net8.0-windows - 1.8.0 + + net20; + net35; + net40; + net45; + net451; + net452; + net46; + net461; + net462; + net47; + net471; + net472; + net48; + net481; + netcoreapp2.0; + netcoreapp2.1; + netcoreapp2.2;netcoreapp3.0; + netcoreapp3.1;netstandard2.0; + netstandard2.1; + net5.0; + net5.0-windows; + net6.0; + net6.0-windows; + net7.0; + net7.0-windows; + net8.0; + net8.0-windows; + net8.0-browser; + net9.0; + net9.0-windows; + net9.0-browser; + + 1.9.0 Lakhya Jyoti Nath Lakhya's Innovation Inc. .NET library to generate N random strings of M length from 13 categories - Copyright © 2020-2023 Lakhya's Innovation Inc. + Copyright © 2020-2025 Lakhya's Innovation Inc. MIT https://github.com/ljnath/RandomString4Net git https://github.com/ljnath/RandomString4Net.git randomstring4net ljnath lakhya lakhyajyoti innovation lakhya's inc. lakhyajyotinath randomstring random string C# libray password generator passwordgenerator generation symbols randomsymbols lowercase uppercase mixedcase customsymbols randomnumber number - - Initial release with support for alphabet, alphanumeric with any without symbols for all cases -- Added support for random number generation -- Added support for multiple .NET Framework -- Added support to generate true unique random numbers -- Added performance improvement for .NET Framework > 2.0 -- Added support to generate random strings by including strings of each type -- Added support for .NET (>5.0) -- Added support for .NET Core (>2.2) -- Added support for .NET Standard (>2.0) -- Added support for RandomNumberGenerator in .NET 6.0 and higher as RNGCryptoServiceProvider is marked as obsolete -- Added support for .NET 8.0 + + - Initial release with support for alphabet, alphanumeric with any without symbols for all cases + - Added support for random number generation + - Added support for multiple .NET Framework + - Added support to generate true unique random numbers + - Added performance improvement for .NET Framework > 2.0 + - Added support to generate random strings by including strings of each type + - Added support for .NET (>5.0) + - Added support for .NET Core (>2.2) + - Added support for .NET Standard (>2.0) + - Added support for RandomNumberGenerator in .NET 6.0 and higher as RNGCryptoServiceProvider is marked as obsolete + - Added support for .NET 8.0 + - Added support for .NET 9.0 + - Updated random seed to 4 (https://github.com/jshergal/) + True - 1.8.0.0 - 1.8.0.0 + 1.9.0.0 + 1.9.0.0 false False $(AssemblyName) diff --git a/RandomString4NetTest/RandomString4NetTest.csproj b/RandomString4NetTest/RandomString4NetTest.csproj index 8cdfc27..6662752 100644 --- a/RandomString4NetTest/RandomString4NetTest.csproj +++ b/RandomString4NetTest/RandomString4NetTest.csproj @@ -39,6 +39,9 @@ prompt 4 + + true + ..\packages\MSTest.TestFramework.3.1.1\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll diff --git a/RandomString4NetTesterDotNet/RandomString4NetTesterDotNet.csproj b/RandomString4NetTesterDotNet/RandomString4NetTesterDotNet.csproj index b5977b7..4ed1cfc 100644 --- a/RandomString4NetTesterDotNet/RandomString4NetTesterDotNet.csproj +++ b/RandomString4NetTesterDotNet/RandomString4NetTesterDotNet.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 enable enable