uniq_key.cpp 342 B

1234567891011121314
  1. //
  2. // Created by zx on 2020/8/10.
  3. //
  4. #include "uniq_key.h"
  5. #include <boost/uuid/uuid.hpp>
  6. #include <boost/uuid/uuid_generators.hpp>
  7. #include <boost/uuid/uuid_io.hpp>
  8. std::string create_key()
  9. {
  10. boost::uuids::uuid uid = boost::uuids::random_generator()();
  11. const std::string uid_str = boost::uuids::to_string(uid);
  12. return uid_str;
  13. }