Skip to content

AnjalBam/cpp-uuid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

UUID library for C++

This is a UUID library for implemented in C++ and can be used by downloading this repository and copy uuid.h file to your project and include it in your project like

#include "uuid.h"

Usage

You can use this library to generate uuid libraries as follows.

// main.cpp
#include <iostream>
#include "uuid.h" // Path to the library

using namespace std;

int main()
{
    uuid::UUID uuid1;
    cout << uuid1.generate();
    return (0);
}

API Reference

  • namespace uuid -> Namespace

    • It includes two classes RandomHexGenerator utility class to generate hex value. And UUID Main class for UUID generation.

      • RandomHexGenerator -> Class

        • Method: string generate() -> Usage:
          • Generates a random hex of length 5
          int main()
          {
              uuid::RandomHexGenerator random_generator;
              std::cout << random_generator.generate()
          }
      • UUID -> Class

        • Method: string generate() -> Usage:
          • Generate a random UUID
          int main()
          {
              uuid::UUID uuid;
              std::cout << uuid.generate();
          }

About

A UUID Generation library for C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages