Generates a unique hash/identifier for a system given a set of parameters.

Overview

uniqueid 🔍

Generates a unique hash/identifier for a system given a set of parameters.

Example usage

use uniqueid;

pub fn main() {
    let data = vec![
        identifier_data!("Vendor", "Intel"),
        identifier_data!("Model", "Xeon E5-2670"),
    ];

    let type_ = identifier_type!(CPU, data);

    let identifier = uniqueid::identifier::Identifier::new(Some("HWID"), vec![type_.clone()]);

    let output = identifier.build(false); // true = hash

    println!("{}", output); // Outputs HWID[CPU(Vendor=Intel, Model=Xeon E5-2670)]
}

Specification

UniqueID uses its own specification.

The spec consists of three parts:
    - The Identifier; []
    - The IdentifierType; ()
    - The IdentifierTypeData; (a=b, ...)
      
A basic identifier would look like this: 

NAME[TYPE(a=b, ...)]

NAME - Optional, defaults to None
TYPE - The type of identifier, e.g. CPU, GPU, etc.
DATA - The data for the identifier, e.g. Vendor=Intel, Model=Xeon E5-2670

This is a very basic example of an identifier, and most use cases will have more types, more data, and hash the output.

Roadmap

  • Calculate the HWID based on the system's hardware in the library without needing to specify it manually.
  • Add support for other hashing algorithms. (currently only supports SHA3-512)

License

This software is licensed under the GNU General Public License v3.0

For more information, see the LICENSE file in the root directory of this project or see here.

Comments
  • build(deps): update sysinfo requirement from 0.23 to 0.26

    build(deps): update sysinfo requirement from 0.23 to 0.26

    Updates the requirements on sysinfo to permit the latest version.

    Changelog

    Sourced from sysinfo's changelog.

    0.26.0

    • Switch memory unit from kilobytes to bytes.
    • Windows: Fix Windows version display on Windows 11.

    0.25.3

    • Add macOS M1 CI checks.
    • macOS M1: Add temperature support.
    • macOS: Fix leak in disk retrieval.

    0.25.2

    • Windows: Fix Process::exe information retrieval.
    • All supported platforms: Correctly handle a PID owner change (#809).

    0.25.1

    • Linux: Fix potential problem on ProcessExt::exe in case /proc/<pid>/exe cannot be read.
    • Add SystemExt::sort_disks_by.

    0.25.0

    • Linux: CPU frequency is now retrieved on-demand as expected when CpuRefreshKind::frequency is true.
    • System::refresh_cpu behaviour changed: it only computes CPU usage and doesn't retrieve CPU frequency.

    0.24.7

    • Windows: Fix boot time computation.
    • macOS: Fix available memory computation.
    • Some documentation fixes.

    0.24.6

    • macOS: Don't compute CPU usage when elapsed time is 0.
    • macOS: Fix memory leak when retrieving disks.
    • C interface: Fix char cast when platform is using unsigned chars.

    0.24.5

    • Implement Hash trait on Uid and Gid types.
    • Remove dependency once_cell for targets other than linux, android and windows.

    0.24.4

    • Windows: Fix System::refresh_process when required higher priviledges.

    0.24.3

    • macOS: Fix System::refresh_processes badly handling updates.

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 2
  • build(deps): update sysinfo requirement from 0.23 to 0.25

    build(deps): update sysinfo requirement from 0.23 to 0.25

    Updates the requirements on sysinfo to permit the latest version.

    Changelog

    Sourced from sysinfo's changelog.

    0.25.0

    • Linux: CPU frequency is now retrieved on-demand as expected when CpuRefreshKind::frequency is true.
    • System::refresh_cpu behaviour changed: it only computes CPU usage and doesn't retrieve CPU frequency.

    0.24.7

    • Windows: Fix boot time computation.
    • macOS: Fix available memory computation.
    • Some documentation fixes.

    0.24.6

    • macOS: Don't compute CPU usage when elapsed time is 0.
    • macOS: Fix memory leak when retrieving disks.
    • C interface: Fix char cast when platform is using unsigned chars.

    0.24.5

    • Implement Hash trait on Uid and Gid types.
    • Remove dependency once_cell for targets other than linux, android and windows.

    0.24.4

    • Windows: Fix System::refresh_process when required higher priviledges.

    0.24.3

    • macOS: Fix System::refresh_processes badly handling updates.
    • FreeBSD: Improve performance of System::refresh_processes.

    0.24.2

    • Windows: Fix CPU usage computation.
    • Windows: Enable extra feature on winapi.
    • macOS: Fix executable path retrieval.

    0.24.1

    • Use saturating_* function for mathematical operations to prevent overflows/underflows.

    0.24.0

    • Rename Processor into Cpu and ProcessorExt into CpuExt.
    • Retrieve information about a process' owner.
    • Add SystemExt::get_user_by_id.
    • Add ProcessExt::user_id.
    • Add ProcessExt::group_id.
    • Add user-related methods to ProcessRefreshKind.
    • Linux: Improve performance when creating new Process by improving retrieval of user ID and group ID.

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 2
  • build(deps): update sysinfo requirement from 0.23 to 0.24

    build(deps): update sysinfo requirement from 0.23 to 0.24

    Updates the requirements on sysinfo to permit the latest version.

    Changelog

    Sourced from sysinfo's changelog.

    0.24.1

    • Use saturating_* function for mathematical operations to prevent overflows/underflows.

    0.24.0

    • Rename Processor into Cpu and ProcessorExt into CpuExt.
    • Retrieve information about a process' owner.
    • Add SystemExt::get_user_by_id.
    • Add ProcessExt::user_id.
    • Add ProcessExt::group_id.
    • Add user-related methods to ProcessRefreshKind.
    • Linux: Improve performance when creating new Process by improving retrieval of user ID and group ID.

    0.23.14

    • Linux: Fix processes' virtual memory computation.

    0.23.13

    • macOS/FreeBSD: Fix System::refresh_process and System::refresh_process_specifics returned value.
    • Linux: Small performance improvement when updating process list.

    0.23.12

    • Linux: Improve System::refresh_cpu performance.
    • Fix clippy lints.

    0.23.11

    • Add FreeBSD to the "supported OS" list
    • Remove useless benchmark results

    0.23.10

    • Improve documentation of SystemExt::refresh_cpu.

    0.23.9

    • macOS: Fix disk retrieval

    0.23.8

    • Windows: Fix underflow for Process run_time computation

    0.23.7

    • macOS: Ignore non-root drive partitions

    0.23.6

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 2
  • build(deps): update sysinfo requirement from 0.23 to 0.27

    build(deps): update sysinfo requirement from 0.23 to 0.27

    Updates the requirements on sysinfo to permit the latest version.

    Changelog

    Sourced from sysinfo's changelog.

    0.27.0

    • Add NetworkExt::mac_address method and MacAddr type.
    • Linux: Fix truncated environment retrieval.
    • Implement TryFrom<usize> and FromStr for Gid and Uid.
    • Implement TryFrom<usize> for Pid.
    • Fix documentation of System::new about CPU list not loaded by default.

    0.26.8

    • Add ProcessExt::session_id method.
    • Linux: Ignore NFS disks.

    0.26.7

    • Apple: Greatly improve disk retrieval (I recommend reading the pull request first comment for more information here: GuillaumeGomez/sysinfo#855).
    • Remove build script.

    0.26.6

    • Add Process::wait.
    • Add "Good pratice" entry into the crate level documentation and in the README.
    • Linux: More precise used memory computation.

    0.26.5

    • Windows: Fix disk information retrieval.
    • Linux: Improve Process document.
    • Linux: Fix a compilation error if the apple-sandbox feature is enabled.
    • Internal code improvements.

    0.26.4

    • Add SystemExt::distribution_id method.
    • Update ntapi version to 0.4.
    • Update minimum supported Rust version (MSRV) to 1.59 for ntapi 0.4.

    0.26.3

    • Update minimum supported Rust version (MSRV) to 1.56 to follow once_cell minor update.

    0.26.2

    • Linux: Fix process information retrieval.
    • Linux: Get more components temperature.
    • Linux: Fix disk name retrieval (which in turn fixed disk type retrieval).

    0.26.1

    • macOS M1: Fix segmentation fault crash.

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
  • build(deps): bump Swatinem/rust-cache from 1 to 2

    build(deps): bump Swatinem/rust-cache from 1 to 2

    Bumps Swatinem/rust-cache from 1 to 2.

    Release notes

    Sourced from Swatinem/rust-cache's releases.

    v2.0.0

    • The action code was refactored to allow for caching multiple workspaces and different target directory layouts.
    • The working-directory and target-dir input options were replaced by a single workspaces option that has the form of $workspace -> $target.
    • Support for considering env-vars as part of the cache key.
    • The sharedKey input option was renamed to shared-key for consistency.

    v1.4.0

    • Clean both debug and release target directories.

    v1.3.0

    • Use Rust toolchain file as additional cache key.
    • Allow for a configurable target-dir.

    v1.2.0

    • Cache ~/.cargo/bin.
    • Support for custom $CARGO_HOME.
    • Add a cache-hit output.
    • Add a new sharedKey option that overrides the automatic job-name based key.

    v1.1.0

    • Add a new working-directory input.
    • Support caching git dependencies.
    • Lots of other improvements.

    v1.0.1

    • Improved logging output.
    • Make sure to consider all-features dependencies when pruning.
    • Work around macOS cache corruption.
    • Remove git-db cache for now.
    Changelog

    Sourced from Swatinem/rust-cache's changelog.

    Changelog

    2.2.0

    • Add new save-if option to always restore, but only conditionally save the cache.

    2.1.0

    • Only hash Cargo.{lock,toml} files in the configured workspace directories.

    2.0.2

    • Avoid calling cargo metadata on pre-cleanup.
    • Added prefix-key, cache-directories and cache-targets options.

    2.0.1

    • Primarily just updating dependencies to fix GitHub deprecation notices.

    2.0.0

    • The action code was refactored to allow for caching multiple workspaces and different target directory layouts.
    • The working-directory and target-dir input options were replaced by a single workspaces option that has the form of $workspace -> $target.
    • Support for considering env-vars as part of the cache key.
    • The sharedKey input option was renamed to shared-key for consistency.

    1.4.0

    • Clean both debug and release target directories.

    1.3.0

    • Use Rust toolchain file as additional cache key.
    • Allow for a configurable target-dir.

    1.2.0

    • Cache ~/.cargo/bin.
    • Support for custom $CARGO_HOME.
    • Add a cache-hit output.
    • Add a new sharedKey option that overrides the automatic job-name based key.

    1.1.0

    • Add a new working-directory input.
    • Support caching git dependencies.
    • Lots of other improvements.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
Releases(v0.2.6)
Owner
Checksum
A rust-enthusiast currently self-employed with freelance work.
Checksum
A type-safe, K-sortable, globally unique identifier

type-safe-id A type-safe, K-sortable, globally unique identifier. Typed implementation of https://github.com/jetpack-io/typeid in Rust. Examples Stati

Conrad Ludgate 13 Jul 10, 2023
Rust implementation of the PTHash perfect hash function for static compile-time generated hash tables

QuickPHF QuickPHF is a Rust implementation of the PTHash minimal perfect hash function algorithm. It consists of two crates: quickphf - runtime code f

Darko Trifunovski 11 Oct 20, 2023
Figures out the local timezone as IANA / Olson identifier

localzone Utility crate to figure out the IANA (Olson) timezone of the current machine. The IANA timezones have been largely established as the standa

Armin Ronacher 11 Jan 4, 2022
Anchor Design of contract - Accounts, Parameters

MarketplaceDesign Anchor Design of contract - Accounts, Parameters Main Instructions are Initialize ListForSale AcceptOffer CancelList MakeOffer Cance

James Johnson 8 Sep 1, 2022
A black-box raw calldata decoder using only calldata to guess types and parse parameters.

Calldata Decoder A black-box raw calldata decoder using only calldata. Based off the topics discussed in DeGatchi's article, Reverse The EVM: Raw Call

DeGatchi 78 Jan 24, 2023
A fast, simple and powerful open-source cross platform utility tool for generating strong, unique and random passwords

password-generator-pro A fast, simple and powerful open-source cross platform utility tool for generating strong, unique and random passwords. Feature

Sebastien Rousseau 3 Dec 16, 2022
Generates a Nix expression for buildDotnetModule, with support for non nuget.org repos.

nuget2nix Generates a Nix expression for buildDotnetModule, with support for non nuget.org repos. Usage Similar to the nuget-to-nix command available

Winter 9 Dec 10, 2022
Generates Solidity code to verify EIP-712 style signatures

eip712 Generates Solidity code to verify EIP-712 style signatures. Usage First, create an abstract contract implementing the functionality you want: /

Sam Wilson 11 Dec 22, 2022
Generates a big overview of dependencies between microservices using pact-broker

Pact graph network Generates a schema of dependencies between microservices using pact-broker data. Table of contents Screenshots Tech Stack Features

ManoMano Tech 3 Dec 15, 2022
Highly modular & configurable hash & crypto library

Octavo Highly modular & configurable hash & crypto library written in pure Rust. Installation [dependencies] octavo = { git = "https://github.com/libO

Octavo Developers 139 Dec 29, 2022
Collection of cryptographic hash functions written in pure Rust

RustCrypto: hashes Collection of cryptographic hash functions written in pure Rust. All algorithms reside in the separate crates and implemented using

Rust Crypto 1.2k Jan 8, 2023
A rust binding for nodejs to generate md5 hash value

Hasher A rust binding for creating node module to generate md5 hash value This project was bootstrapped by create-neon. Installing hasher Installing h

Md. Al-Amin 0 Nov 7, 2021
Reference implementation for the Poseidon Snark-friendly Hash algorithm.

Dusk-Poseidon Reference implementation for the Poseidon Hashing algorithm. Reference Starkad and Poseidon: New Hash Functions for Zero Knowledge Proof

Dusk Network 96 Jan 2, 2023
the official Rust and C implementations of the BLAKE3 cryptographic hash function

BLAKE3 is a cryptographic hash function that is: Much faster than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2. Secure, unlike MD5 and SHA-1. And secure again

BLAKE3 team 3.7k Jan 6, 2023
paq files to hash.

paq paq files to hash. Hash a single file or all files in directory recursively. Installation Requires cargo. Run cargo install paq. Usage Run paq [sr

gregory langlais 3 Oct 10, 2022
Fastmurmur3 - Fast non-cryptographic hash, with the benchmarks to prove it.

Fastmurmur3 Murmur3 is a fast, non-cryptographic hash function. fastmurmur3 is, in my testing, the fastest implementation of Murmur3. Usage let bytes:

Kurt Wolf 13 Dec 2, 2022
An implementation of Jakobsson's Fractal Hash Sequence Traversal algorithm

fractal-hash-traversal An implementation of Jakobsson's Fractal Hash Sequence Traversal algorithm. There is at least one hash traversal algorithm that

Dan Cline 1 Jan 12, 2022
computed data's hash by webAssembly

wasm-hasher computed data's hash by webAssembly support md5,sha1,sha2-224,sha2-356,sha2-384,sha2-512,sha3-224,sha3-256,sha3-384,sha3-512,china-sm3 typ

fuyoo 2 Oct 13, 2022
Left To My Own Devices - NT hash tools

ntcrack Left To My Own Devices - NT cracker A full writeup of how it works is available at the SensePost blog Invocation ./ntcrack <input hashlist> <w

SensePost 24 Nov 24, 2022