diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-11-17 17:07:46 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-11-29 15:13:00 +0100 |
commit | 70fc4f57902290c48bec9acb2393ded84c09d4ca (patch) | |
tree | 3db642c2421d7aaae660e6071370a42e3a7da9ad /src/systemd/sd-id128.h | |
parent | 0fe5f3c5d743a7e4c63580a67066935f9e23a2f4 (diff) | |
download | systemd-70fc4f57902290c48bec9acb2393ded84c09d4ca.tar.gz |
sd-id128: add new sd_id128_get_machine_app_specific() API
This adds an API for retrieving an app-specific machine ID to sd-id128.
Internally it calculates HMAC-SHA256 with an 128bit app-specific ID as payload
and the machine ID as key.
(An alternative would have been to use siphash for this, which is also
cryptographically strong. However, as it only generates 64bit hashes it's not
an obvious choice for generating 128bit IDs.)
Fixes: #4667
Diffstat (limited to 'src/systemd/sd-id128.h')
-rw-r--r-- | src/systemd/sd-id128.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemd/sd-id128.h b/src/systemd/sd-id128.h index ee011b1861..6cc8e4ac0e 100644 --- a/src/systemd/sd-id128.h +++ b/src/systemd/sd-id128.h @@ -39,12 +39,12 @@ union sd_id128 { #define SD_ID128_STRING_MAX 33 char *sd_id128_to_string(sd_id128_t id, char s[SD_ID128_STRING_MAX]); - int sd_id128_from_string(const char *s, sd_id128_t *ret); int sd_id128_randomize(sd_id128_t *ret); int sd_id128_get_machine(sd_id128_t *ret); +int sd_id128_get_machine_app_specific(sd_id128_t app_id, sd_id128_t *ret); int sd_id128_get_boot(sd_id128_t *ret); int sd_id128_get_invocation(sd_id128_t *ret); |