Skip to content

KSUID implementation in C++. Now working and provides valid KSUIDs. Not rigorously tested.

Notifications You must be signed in to change notification settings

medamine101/KsuidCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KSUID C++

KSUID Implementation in C++

Implementation complete and appears to be working, only tested on macOS 12.3.1 on an Intel CPU.

Credits to German Mendez Bravo (Kronuz) for the base_x.hh and uinteger_t.hh files. Original repo can be found here.

This implementation is a C++ port of the Java implementation ksuid. This verson is functionally equivalent, with some differences listed below:

  • Operator overloading is used in this C++ implementation to support sorting rather than the Java version's equals() and compareTo() methods.
  • The Java version's hashCode() method is not implemented in this C++ version.
  • The Java version's toString() method is not implemented in this C++ version. Other string methods are implemented.

Potential Issues with this implementation:

  • If anything other than a 64-bit machine is used, then the toLogString() method may not work as the assumption that an int is 4 bytes is made.
  • I do not know if endianness is an issue with relation to how information is moved from the int timestamp to 4 separate bytes in ksuidBytes vector.

About

KSUID implementation in C++. Now working and provides valid KSUIDs. Not rigorously tested.

Topics

Resources

Stars

Watchers

Forks

Languages