Coder Social home page Coder Social logo

checksumdev / uniqueid Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 59 KB

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

Home Page: https://docs.rs/uniqueid

License: GNU General Public License v3.0

Rust 100.00%
authentication crypto cryptography data-structures generator hardware hwid library os rust

uniqueid's Introduction

uniqueid ๐Ÿ”

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

Example usage

   use uniqueid::{IdentifierBuilder, IdentifierType};

   let mut builder = IdentifierBuilder::default();
   
   builder.name("test");
   builder.add(IdentifierType::CPU);
   builder.add(IdentifierType::RAM);
   builder.add(IdentifierType::DISK);

   let identifier = builder.build();

   println!("{}", identifier.to_string(false)); // false = do not hash the identifier (useful for debugging)

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 name of the identifier. (Can be used as a label or salt)
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 identifier types. (currently only supports CPU, RAM, and DISK) - PR's welcome!
  • Add disk serial checking.
  • 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.

uniqueid's People

Contributors

checksumdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lumenpink

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.