From bc451b6aa86373a1484a223e4bf388882df48dca Mon Sep 17 00:00:00 2001 From: "lykos@d125a37d89b1cfac20829f12911656c40cb70018" Date: Thu, 27 Jun 2024 10:47:43 +0000 Subject: [PATCH] --- doc/forum/Calculate_HMAC_of_special_remote.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/forum/Calculate_HMAC_of_special_remote.mdwn diff --git a/doc/forum/Calculate_HMAC_of_special_remote.mdwn b/doc/forum/Calculate_HMAC_of_special_remote.mdwn new file mode 100644 index 0000000000..f4b2761bff --- /dev/null +++ b/doc/forum/Calculate_HMAC_of_special_remote.mdwn @@ -0,0 +1,14 @@ +Hello, + +I need to do some plumbing in a special remote. What is the best way to get the filenames of all the chunks belonging to a key? +From https://git-annex.branchable.com/internals/ I know that `.log.cnk` stores size and number of chunks. And that part of the cipher in remote.log is used as the HMAC encryption key. + +I found that I can use `openssl` to calculate the HMAC, but what exactly do I need to feed it? + +``` +echo $PAYLOAD | openssl sha512 -hex -mac HMAC -macopt hexkey:$KEY_HEX +``` + +Or is there a git-annex plumbing command that I overlooked? + +--lykos153 -- 2.39.5