mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 16:14:26 +01:00
hsmtool: tighten checks for validity on getcodexsecret
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -42,18 +42,19 @@ struct codex32 *codex32_decode(const tal_t *ctx,
|
||||
|
||||
/** Encode a seed into codex32 secret format.
|
||||
*
|
||||
* Out: char *: String containing the codex32 (BIP93) format secret.
|
||||
* fail: Asserting error if invalid threshold is used.
|
||||
* In: input: id: Valid 4 char string identifying the secret
|
||||
* threshold: Threshold according to the bip93
|
||||
* seed: The secret in u8*
|
||||
* seedlen: Length of the seed provided.
|
||||
* Returns a string which contains the seed provided in bip93 format.
|
||||
*
|
||||
* Returns an error string, or returns NULL and sets @bip93.
|
||||
*/
|
||||
char *codex32_secret_encode(const tal_t *ctx,
|
||||
const char *id,
|
||||
const u32 threshold,
|
||||
const u8 *seed,
|
||||
size_t seedlen);
|
||||
const char *codex32_secret_encode(const tal_t *ctx,
|
||||
const char *id,
|
||||
const u32 threshold,
|
||||
const u8 *seed,
|
||||
size_t seedlen,
|
||||
char **bip93);
|
||||
|
||||
#endif /* LIGHTNING_COMMON_CODEX32_H */
|
||||
|
||||
Reference in New Issue
Block a user