+void subkeypath(char *buffer, uint64_t subkey, uint64_t keyid)
+{
+ snprintf(buffer, PATH_MAX, "%s/subkeys/%02X/%02X/%08X/%016llX",
+ config.db_dir,
+ (uint8_t) ((subkey >> 24) & 0xFF),
+ (uint8_t) ((subkey >> 16) & 0xFF),
+ (uint32_t) (subkey & 0xFFFFFFFF),
+ keyid);
+}
+
+void subkeydir(char *buffer, uint64_t subkey)
+{
+ snprintf(buffer, PATH_MAX, "%s/subkeys/%02X/%02X/%08X",
+ config.db_dir,
+ (uint8_t) ((subkey >> 24) & 0xFF),
+ (uint8_t) ((subkey >> 16) & 0xFF),
+ (uint32_t) (subkey & 0xFFFFFFFF));
+}
+