mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
b99c5620ef
We alternated between using a sha256 and using a privkey, but there are numerous places where we have a random 32 bytes which are neither. This fixes many of them (plus, struct privkey is now defined in terms of struct secret). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 lines
377 B
C
16 lines
377 B
C
#ifndef LIGHTNING_BITCOIN_PRIVKEY_H
|
|
#define LIGHTNING_BITCOIN_PRIVKEY_H
|
|
#include "config.h"
|
|
#include <ccan/short_types/short_types.h>
|
|
|
|
/* General 256-bit secret, which must be private. Used in various places. */
|
|
struct secret {
|
|
u8 data[32];
|
|
};
|
|
|
|
/* This is a private key. Keep it secret. */
|
|
struct privkey {
|
|
struct secret secret;
|
|
};
|
|
#endif /* LIGHTNING_BITCOIN_PRIVKEY_H */
|