DeviceId alternatives and similar packages
Based on the "Misc" category.
Alternatively, view DeviceId alternatives based on common mentions on social networks and blogs.
-
Polly
Express transient exception handling policies such as Retry, Retry Forever, Wait andRetry or Circuit Breaker in a fluent manner. (.NET 3.5 / 4.0 / 4.5 / PCL / Xamarin) -
FluentValidation
A small validation library for .NET that uses a fluent interface and lambda expressions for building validation rules. -
Humanizer
Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities -
Edge.js
Run .NET and Node.js code in-process on Windows, MacOS, and Linux -
CsvHelper
Library to help reading and writing CSV files https://github.com/JoshClose/CsvHelper -
ReactJS.NET
ReactJS.NET is a library that makes it easier to use Babel along with Facebook's React and JSX from C#. -
ScriptCS
Write C# apps with a text editor, nuget and the power of Roslyn! -
Jint
Javascript interpreter for .NET which provides full ECMA 5.1 compliance and can run on any .NET plaftform. -
YoutubeExplode
Ultimate library for extracting metadata and downloading Youtube videos and playlists. -
Coravel
Near-zero config .NET Core library that makes Task Scheduling, Caching, Queuing, Mailing, Event Broadcasting (and more) a breeze! -
Enums.NET
Enums.NET is a high-performance type-safe .NET enum utility library -
WorkflowEngine
HTML5 Designer, Customizable, Parallel branching, Versioning -
Jurassic
A implementation of the ECMAScript language and runtime. It aims to provide the best performing and most standards-compliant implementation of JavaScript for .NET. -
HidLibrary
This library enables you to enumerate and communicate with Hid compatible USB devices in .NET. -
Warden
Define "health checks" for your applications, resources and infrastructure. Keep your Warden on the watch -
ENet-CSharp
Reliable UDP networking library extended for the .NET environment -
Hashids.net
Generate short unique ids from integers, as per https://hashids.org -
Aeron.NET
Efficient reliable UDP unicast, UDP multicast, and IPC message transport -
Jot
a library for persisting and restoring application state (a better alternative to .settings files). -
Streams
A lightweight F#/C# library for efficient functional-style pipelines on streams of data. -
ByteSize
ByteSize is a utility class that makes byte size representation in code easier by removing ambiguity of the value being represented. ByteSize is to bytes what System.TimeSpan is to time. -
Mediator.Net
A simple mediator for .Net for sending command, publishing event and request response with pipelines supported -
TypeShape
TypeShape is a small, extensible F# library for practical generic programming -
SolidSoils4Arduino
C# .NET - Arduino library supporting simultaneous serial ASCII, Firmata and I2C communication -
SystemWrapper
SystemWrapper is .NET library for easier testing of system APIs. -
Shielded
Software Transactional Memory (STM) implementation for .NET -
DeviceDetector.NET
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model. -
FormHelper
Form & Validation Helper for ASP.NET Core. Form Helper helps you to create ajax forms and validations without writing any javascript code. (Compatible with Fluent Validation) -
Jering.Javascript.NodeJS
Invoke Javascript in NodeJS, from C# -
Validot
Validot is a performance-first, compact library for advanced model validation. Using a simple declarative fluent interface, it efficiently handles classes, structs, nested members, collections, nullables, plus any relation or combination of them. It also supports translations, custom logic extensions with tests, and DI containers. -
https://github.com/minhhungit/ConsoleTableExt
Fluent library to create table for .Net console application. -
Outcome.NET
Never write a result wrapper again! Outcome.NET is a simple, powerful helper for methods that return a value, but sometimes also need to return validation messages, warnings, or a success bit. -
FlatMapper
A library to import and export data from and to plain text files in a Linq compatible way. -
AzureCrawler
Take HTML Snapshots for your Angular, Ember, Durandal or any JavaScript applications -
NaturalSort.Extension
Extension method for StringComparer that adds support for natural sorting (e.g. "abc1", "abc2", "abc10" instead of "abc1", "abc10", "abc2"). -
BerTlv.NET
A library for parsing BER TLV data (like EMV credit cards). -
trybot
A transient fault handling framework including such resiliency solutions as Retry, Timeout, Fallback, Rate Limit and Circuit Breaker. -
AdaskoTheBeAsT.FluentValidation.MediatR
FluentValidation behavior for MediatR -
LINQPad
a C#/VB/F# scratchpad that instantly executes any expression, statement block or program with rich output formatting and a wealth of features. Also lets you interactively query databases in LINQ. [$]
Scout APM - Leading-edge performance monitoring starting at $39/month
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of DeviceId or a related project?
README
DeviceId
A simple library providing functionality to generate a 'device ID' that can be used to uniquely identify a computer.
Quickstart
Building a device identifier
Use the DeviceIdBuilder
class to build up a device ID.
string deviceId = new DeviceIdBuilder()
.AddMachineName()
.AddProcessorId()
.AddMotherboardSerialNumber()
.AddSystemDriveSerialNumber()
.ToString();
What can you include in a device identifier
The following extension methods are available out of the box to suit some common use cases:
AddUserName()
adds the current user's username to the device ID.AddMachineName()
adds the machine name to the device ID.AddOSVersion()
adds the current OS version (as returned byEnvironment.OSVersion
) to the device ID.AddMacAddress()
adds the MAC address to the device ID.AddProcessorId()
adds the processor ID to the device ID.AddMotherboardSerialNumber()
adds the motherboard serial number to the device ID.AddSystemDriveSerialNumber()
adds the system drive's serial number to the device ID.AddSystemUUID()
adds the system UUID to the device ID.AddOSInstallationID()
adds the OS installation ID.AddFileToken(path)
adds a token stored at the specified path to the device ID.AddRegistryValue()
adds a value from the registry.AddComponent(component)
adds a custom component (see below) to the device ID.
Custom components can be built by implementing IDeviceIdComponent
. There is also a simple DeviceIdComponent
class that allows you to specify an arbitrary component value to use, and a WmiDeviceIdComponent
class that uses a specified WMI property (example: new WmiDeviceIdComponent("MACAddress", "Win32_NetworkAdapterConfiguration", "MACAddress"
).
Dealing with MAC Address randomization and virtual network adapters
Non physical network adapters like VPN connections tend not to have fixed MAC addresses. For wireless (802.11 based) adapters hardware (MAC) address randomization is frequently applied to avoid tracking with many modern operating systems support this out of the box. This makes wireless network adapters bad candidates for device identification.
Use AddMacAddress(true, true)
to exclude both virtual and wireless network adapters.
Controlling how the device identifier is formatted
Use the UseFormatter
method to set the formatter.
string deviceId = new DeviceIdBuilder()
.AddProcessorId()
.AddMotherboardSerialNumber()
.UseFormatter(new HashDeviceIdFormatter(() => SHA256.Create(), new Base64UrlByteArrayEncoder()))
.ToString();
You can use one of the out-of-the-box implementations of IDeviceIdFormatter
in the DeviceId.Formatters
namespace, or you can create your own.
- StringDeviceIdFormatter - Formats the device ID as a string containing each component ID, using any desired component encoding.
- HashDeviceIdFormatter - Formats the device ID as a hash string, using any desired hash algorithm and byte array encoding.
- XmlDeviceIdFormatter - Formats the device ID as an XML document, using any desired component encoding.
There are a number of encoders that can be used customize the formatter. These implement IDeviceIdComponentEncoder
and IByteArrayEncoder
and are found in the DeviceId.Encoders
namespace.
- PlainTextDeviceIdComponentEncoder - Encodes a device ID component as plain text.
- HashDeviceIdComponentEncoder - Encodes a device ID component as a hash string, using any desired hash algorithm.
- HexByteArrayEncoder - Encodes a byte array as a hex string.
- Base64ByteArrayEncoder - Encodes a byte array as a base 64 string.
- Base64UrlByteArrayEncoder - Encodes a byte array as a base 64 url-encoded string.
Cross-platform support
The following cross-platform support is available:
Component | Windows | Linux | OSX |
---|---|---|---|
User name | Yes | Yes | Yes |
Machine name | Yes | Yes | Yes |
OS version | Yes | Yes | Yes |
Processor ID | Yes | Yes | No |
MAC address | Yes | Yes | Yes |
Motherboard serial number | Yes | Yes | No |
System drive serial number | Yes | Yes | Yes |
System UUID | Yes | Yes | No |
OS installation ID | Yes | Yes | Yes |
Registry value | Yes | No | No |
File token | Yes | Yes | Yes |
Installation
Just grab it from NuGet
PM> Install-Package DeviceId
$ dotnet add package DeviceId
Strong naming
From version 5 onwards, the assemblies in this package are strong named for the convenience of those users who require strong naming. Please note, however, that the key files are checked in to this repository. This means that anyone can compile their own version and strong name it with the original keys. This is a common practice with open source projects, but it does mean that you shouldn't use the strong name as a guarantee of security or identity.
License and copyright
Copyright Matthew King 2015-2020. Distributed under the MIT License. Refer to license.txt for more information.
*Note that all licence references and agreements mentioned in the DeviceId README section above
are relevant to that project's source code only.