Skip to content

Commit

Permalink
v1.9.0 - added support for .NET 9.0 and changed random seed value to 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ljnath committed Dec 31, 2024
1 parent f01e288 commit 0524cb2
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 25 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# RandomString4Net
### Version 1.8.0
### Version 1.9.0

Author : Lakhya Jyoti Nath (ljnath)<br>
Date : September 2020 - December 2022 - January 2023 - October 2023 - November 2023<br>
Date : September 2020 - January 2025<br>
Email : [email protected]<br>
Website : https://www.ljnath.com

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
2 changes: 1 addition & 1 deletion RandomString4Net/DataSource.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions RandomString4Net/RandomString.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -160,7 +160,7 @@ private static List<string> 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();
Expand All @@ -172,7 +172,7 @@ private static List<string> 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);
Expand Down
68 changes: 52 additions & 16 deletions RandomString4Net/RandomString4Net.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,66 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>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</TargetFrameworks>
<Version>1.8.0</Version>
<TargetFrameworks>
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;
</TargetFrameworks>
<Version>1.9.0</Version>
<Authors>Lakhya Jyoti Nath</Authors>
<Company>Lakhya's Innovation Inc.</Company>
<Description>.NET library to generate N random strings of M length from 13 categories</Description>
<Copyright>Copyright © 2020-2023 Lakhya's Innovation Inc.</Copyright>
<Copyright>Copyright © 2020-2025 Lakhya's Innovation Inc.</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/ljnath/RandomString4Net</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/ljnath/RandomString4Net.git</RepositoryUrl>
<PackageTags>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 </PackageTags>
<PackageReleaseNotes>- 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 &gt; 2.0
- Added support to generate random strings by including strings of each type
- Added support for .NET (&gt;5.0)
- Added support for .NET Core (&gt;2.2)
- Added support for .NET Standard (&gt;2.0)
- Added support for RandomNumberGenerator in .NET 6.0 and higher as RNGCryptoServiceProvider is marked as obsolete
- Added support for .NET 8.0</PackageReleaseNotes>
<PackageReleaseNotes>
- 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 &gt; 2.0
- Added support to generate random strings by including strings of each type
- Added support for .NET (&gt;5.0)
- Added support for .NET Core (&gt;2.2)
- Added support for .NET Standard (&gt;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/)
</PackageReleaseNotes>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<AssemblyVersion>1.8.0.0</AssemblyVersion>
<FileVersion>1.8.0.0</FileVersion>
<AssemblyVersion>1.9.0.0</AssemblyVersion>
<FileVersion>1.9.0.0</FileVersion>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<AutoGenerateBindingRedirects>False</AutoGenerateBindingRedirects>
<Title>$(AssemblyName)</Title>
Expand Down
3 changes: 3 additions & 0 deletions RandomString4NetTest/RandomString4NetTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.3.1.1\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down

0 comments on commit 0524cb2

Please sign in to comment.