Skip to content

Commit 0524cb2

Browse files
committed
v1.9.0 - added support for .NET 9.0 and changed random seed value to 4
1 parent f01e288 commit 0524cb2

File tree

7 files changed

+66
-25
lines changed

7 files changed

+66
-25
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2023 Lakhya Jyoti Nath
3+
Copyright (c) 2020-2025 Lakhya Jyoti Nath
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RandomString4Net
2-
### Version 1.8.0
2+
### Version 1.9.0
33

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

@@ -46,6 +46,8 @@ etc. etc.
4646
* Added support for .NET Standard (>2.0)
4747
* Added support for RandomNumberGenerator in .NET 6.0 and higher as RNGCryptoServiceProvider is marked as obsolete
4848
* Added support for .NET 8.0
49+
* Added support for .NET 9.0
50+
* Updated random seed to 4 (https://github.com/jshergal/)
4951

5052

5153
## Supported Types
@@ -114,4 +116,4 @@ Thanks in advance !
114116

115117
## License
116118

117-
Copyright © 2020-2023 [Lakhya's Innovation Inc.](https://github.com/ljnath/) under the [MIT License](https://github.com/ljnath/RandomString4Net/blob/master/LICENSE).
119+
Copyright © 2020-2025 [Lakhya's Innovation Inc.](https://github.com/ljnath/) under the [MIT License](https://github.com/ljnath/RandomString4Net/blob/master/LICENSE).

RandomString4Net/DataSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
*
33
* RandomString4Net - .NET library to generate N random strings of M length from various categories
4-
* Copyright (c) 2020-2023 Lakhya Jyoti Nath
4+
* Copyright (c) 2020-2025 Lakhya Jyoti Nath
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

RandomString4Net/RandomString.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
*
33
* RandomString4Net - .NET library to generate N random strings of M length from various categories
4-
* Copyright (c) 2020-2023 Lakhya Jyoti Nath
4+
* Copyright (c) 2020-2025 Lakhya Jyoti Nath
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -160,7 +160,7 @@ private static List<string> GetRandomStrings(string[] inputStrings, int count, i
160160
if (count <= 0 || maxLength <= 0)
161161
throw new InvalidLengthException("Number and length of random strings should be a non-zero postive numbver");
162162

163-
byte[] randomSeeds = new byte[1];
163+
byte[] randomSeeds = new byte[4];
164164

165165
#if NET6_0_OR_GREATER
166166
RandomNumberGenerator randomNumberGenerator = RandomNumberGenerator.Create();
@@ -172,7 +172,7 @@ private static List<string> GetRandomStrings(string[] inputStrings, int count, i
172172
#endif
173173

174174
// creating an instance of Random() using the random seed value
175-
Random random = new Random(randomSeeds[0]);
175+
Random random = new Random(BitConverter.ToInt32(randomSeeds, 0));
176176

177177
if (!forceOccuranceOfEachType)
178178
return getRandomStrings(random, String.Join("", inputStrings), count, maxLength, randomLength, forceUnique);

RandomString4Net/RandomString4Net.csproj

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,66 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<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>
4-
<Version>1.8.0</Version>
3+
<TargetFrameworks>
4+
net20;
5+
net35;
6+
net40;
7+
net45;
8+
net451;
9+
net452;
10+
net46;
11+
net461;
12+
net462;
13+
net47;
14+
net471;
15+
net472;
16+
net48;
17+
net481;
18+
netcoreapp2.0;
19+
netcoreapp2.1;
20+
netcoreapp2.2;netcoreapp3.0;
21+
netcoreapp3.1;netstandard2.0;
22+
netstandard2.1;
23+
net5.0;
24+
net5.0-windows;
25+
net6.0;
26+
net6.0-windows;
27+
net7.0;
28+
net7.0-windows;
29+
net8.0;
30+
net8.0-windows;
31+
net8.0-browser;
32+
net9.0;
33+
net9.0-windows;
34+
net9.0-browser;
35+
</TargetFrameworks>
36+
<Version>1.9.0</Version>
537
<Authors>Lakhya Jyoti Nath</Authors>
638
<Company>Lakhya's Innovation Inc.</Company>
739
<Description>.NET library to generate N random strings of M length from 13 categories</Description>
8-
<Copyright>Copyright © 2020-2023 Lakhya's Innovation Inc.</Copyright>
40+
<Copyright>Copyright © 2020-2025 Lakhya's Innovation Inc.</Copyright>
941
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1042
<PackageProjectUrl>https://github.com/ljnath/RandomString4Net</PackageProjectUrl>
1143
<RepositoryType>git</RepositoryType>
1244
<RepositoryUrl>https://github.com/ljnath/RandomString4Net.git</RepositoryUrl>
1345
<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>
14-
<PackageReleaseNotes>- Initial release with support for alphabet, alphanumeric with any without symbols for all cases
15-
- Added support for random number generation
16-
- Added support for multiple .NET Framework
17-
- Added support to generate true unique random numbers
18-
- Added performance improvement for .NET Framework &gt; 2.0
19-
- Added support to generate random strings by including strings of each type
20-
- Added support for .NET (&gt;5.0)
21-
- Added support for .NET Core (&gt;2.2)
22-
- Added support for .NET Standard (&gt;2.0)
23-
- Added support for RandomNumberGenerator in .NET 6.0 and higher as RNGCryptoServiceProvider is marked as obsolete
24-
- Added support for .NET 8.0</PackageReleaseNotes>
46+
<PackageReleaseNotes>
47+
- Initial release with support for alphabet, alphanumeric with any without symbols for all cases
48+
- Added support for random number generation
49+
- Added support for multiple .NET Framework
50+
- Added support to generate true unique random numbers
51+
- Added performance improvement for .NET Framework &gt; 2.0
52+
- Added support to generate random strings by including strings of each type
53+
- Added support for .NET (&gt;5.0)
54+
- Added support for .NET Core (&gt;2.2)
55+
- Added support for .NET Standard (&gt;2.0)
56+
- Added support for RandomNumberGenerator in .NET 6.0 and higher as RNGCryptoServiceProvider is marked as obsolete
57+
- Added support for .NET 8.0
58+
- Added support for .NET 9.0
59+
- Updated random seed to 4 (https://github.com/jshergal/)
60+
</PackageReleaseNotes>
2561
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
26-
<AssemblyVersion>1.8.0.0</AssemblyVersion>
27-
<FileVersion>1.8.0.0</FileVersion>
62+
<AssemblyVersion>1.9.0.0</AssemblyVersion>
63+
<FileVersion>1.9.0.0</FileVersion>
2864
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2965
<AutoGenerateBindingRedirects>False</AutoGenerateBindingRedirects>
3066
<Title>$(AssemblyName)</Title>

RandomString4NetTest/RandomString4NetTest.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
<ErrorReport>prompt</ErrorReport>
4040
<WarningLevel>4</WarningLevel>
4141
</PropertyGroup>
42+
<PropertyGroup>
43+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
44+
</PropertyGroup>
4245
<ItemGroup>
4346
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
4447
<HintPath>..\packages\MSTest.TestFramework.3.1.1\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>

RandomString4NetTesterDotNet/RandomString4NetTesterDotNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>

0 commit comments

Comments
 (0)