crypto: fix contract.h
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
+#define ELEKTRA_CRYPTO_CONTRACT_XSTR_VAL(s) #s
+#define ELEKTRA_CRYPTO_CONTRACT_STR_VAL(s) ELEKTRA_CRYPTO_CONTRACT_XSTR_VAL (s)
+
keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME, KEY_VALUE, "crypto plugin waits for your orders", KEY_END),
keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports", KEY_END),
keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/open", KEY_FUNC, CRYPTO_PLUGIN_FUNCTION (open), KEY_END),
@@ -18,9 +21,10 @@ keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME, KEY_VALUE, "crypto plugin
keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/PAYLOAD_VERSION", KEY_VALUE, ELEKTRA_CRYPTO_PAYLOAD_VERSION,
KEY_END),
keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/masterpasswordlength", KEY_VALUE,
- ELEKTRA_CRYPTO_DEFAULT_MASTER_PWD_LENGTH, KEY_END),
- keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/iterations", KEY_VALUE, ELEKTRA_CRYPTO_DEFAULT_ITERATION_COUNT,
- KEY_END),
- keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/saltlength", KEY_VALUE, ELEKTRA_CRYPTO_DEFAULT_SALT_LEN, KEY_END),
+ ELEKTRA_CRYPTO_CONTRACT_STR_VAL (ELEKTRA_CRYPTO_DEFAULT_MASTER_PWD_LENGTH), KEY_END),
+ keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/iterations", KEY_VALUE,
+ ELEKTRA_CRYPTO_CONTRACT_STR_VAL (ELEKTRA_CRYPTO_DEFAULT_ITERATION_COUNT), KEY_END),
+ keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/saltlength", KEY_VALUE,
+ ELEKTRA_CRYPTO_CONTRACT_STR_VAL (ELEKTRA_CRYPTO_DEFAULT_SALT_LEN), KEY_END),
keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/algorithm", KEY_VALUE, "AES256", KEY_END),
keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/mode", KEY_VALUE, "CBC", KEY_END),
