]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-id128/sd-id128.c
sd-id128: add new sd_id128_get_machine_app_specific() API 4686/head
authorLennart Poettering <lennart@poettering.net>
Thu, 17 Nov 2016 16:07:46 +0000 (17:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 29 Nov 2016 14:13:00 +0000 (15:13 +0100)
commit70fc4f57902290c48bec9acb2393ded84c09d4ca
tree3db642c2421d7aaae660e6071370a42e3a7da9ad
parent0fe5f3c5d743a7e4c63580a67066935f9e23a2f4
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
Makefile-man.am
man/machine-id.xml
man/sd_id128_get_machine.xml
src/libsystemd/libsystemd.sym
src/libsystemd/sd-id128/sd-id128.c
src/systemd/sd-id128.h
src/test/test-id128.c