Ensure that ECDSA constant sizes are correctly-sized

This commit is contained in:
Jack Grigg
2017-06-08 16:07:49 +12:00
parent 48abe78e51
commit 1ce9f0a952
2 changed files with 6 additions and 0 deletions

View File

@@ -48,6 +48,9 @@ private:
* Its length can very cheaply be computed from the first byte.
*/
unsigned char vch[PUBLIC_KEY_SIZE];
static_assert(
PUBLIC_KEY_SIZE >= COMPRESSED_PUBLIC_KEY_SIZE,
"COMPRESSED_PUBLIC_KEY_SIZE is larger than PUBLIC_KEY_SIZE");
//! Compute the length of a pubkey with a given first byte.
unsigned int static GetLen(unsigned char chHeader)