EPS.Extensions.Unique
8.0.1
See the version list below for details.
dotnet add package EPS.Extensions.Unique --version 8.0.1
NuGet\Install-Package EPS.Extensions.Unique -Version 8.0.1
<PackageReference Include="EPS.Extensions.Unique" Version="8.0.1" />
paket add EPS.Extensions.Unique --version 8.0.1
#r "nuget: EPS.Extensions.Unique, 8.0.1"
// Install EPS.Extensions.Unique as a Cake Addin #addin nuget:?package=EPS.Extensions.Unique&version=8.0.1 // Install EPS.Extensions.Unique as a Cake Tool #tool nuget:?package=EPS.Extensions.Unique&version=8.0.1
EPS.Extensions.Unique
What initially started as a way to replace System.Web.Security.Membership.GeneratePassword from legacy ASP.NET has turned into a unique ID generator that's shorter than using GUIDs. You can use it to build identifiers similar to YouTube or Firestore IDs, if needed. We ran a test building identifiers with 7 alphanumeric characters (and no punctuation characters) and managed to get 10 million unique identifiers out of it. We didn't try a larger number, but, assuming our math isn't wrong (🤷), it seems you should be able to get at least 62^7 or 3.522 trillion unique identifiers out of it.
Sample output:
[Fact]
public void TestUnique()
{
var hs = new HashSet<string>();
for (int i = 0; i < 100; i++)
{
var u = Unique.Unique.Generate(8, 0);
hs.Add(u);
output.WriteLine(u);
}
}
Xq8Lnhkq
udPe7BhM
mvsKFYjy
IiQrpozS
hcbskLr4
VmsINq1M
O2rMu84n
f6sHbtk1
XbDcLacW
idhJKidB
xAgditbO
TuQCrY3U
...
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Add two new methods to give random uppercase and lowercase characters.