diff --git a/dap-sdk/crypto/include/dap_guiid.h b/dap-sdk/crypto/include/dap_guiid.h new file mode 100644 index 0000000000000000000000000000000000000000..8e468169f82b3f621a729afdedb74e2363a5696e --- /dev/null +++ b/dap-sdk/crypto/include/dap_guiid.h @@ -0,0 +1,30 @@ +/* + * Authors: + * Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net> + * DeM Labs Ltd. https://demlabs.net + * Copyright (c) 2021 + * All rights reserved. + + This file is part of DAP SDK the open source project + + DAP SDK is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP SDK is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP SDK based project. If not, see <http://www.gnu.org/licenses/>. +*/ +#pragma once +#include "dap_uuid.h" + +typedef uint128_t dap_guuid_t; +static inline dap_guuid_t dap_guuid_new() +{ + return (dap_guuid_t) dap_uuid_generate_uint128(); +} diff --git a/dap-sdk/crypto/include/dap_uuid.h b/dap-sdk/crypto/include/dap_uuid.h index 6aa5e7e2bfda0174e0d9f1f0d602534fec3ef313..5e932f6d7f1bd30a0a9e8a59a8c01ff8d3c3e7e5 100644 --- a/dap-sdk/crypto/include/dap_uuid.h +++ b/dap-sdk/crypto/include/dap_uuid.h @@ -24,7 +24,7 @@ #pragma once #include "dap_math_ops.h" -uint128_t dap_uuid_generate_uint128(); // Produce uint128 unique id -uint64_t dap_uuid_generate_uint64(); // Produce uint64 unique id +uint128_t dap_uuid_generate_uint128(); // Produce uint128 global unique id +uint64_t dap_uuid_generate_uint64(); // Produce uint64 global unique id // Produces unique nonce void dap_uuid_generate_nonce(void *a_nonce, size_t a_nonce_size);