mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-18 04:00:03 +02:00
src/ec.h: move typedefs and struct to types.h
This commit is contained in:
parent
0bda9e3f2a
commit
8007a39c35
2 changed files with 11 additions and 9 deletions
9
src/ec.h
9
src/ec.h
|
|
@ -24,17 +24,8 @@
|
|||
#ifndef EC_H
|
||||
#define EC_H
|
||||
|
||||
#include <array>
|
||||
#include "types.h"
|
||||
|
||||
typedef std::array<unsigned char, EC_PRIVKEY_SIZE> ec_privkey_t;
|
||||
typedef std::array<unsigned char, EC_PUBKEY_SIZE> ec_pubkey_t;
|
||||
|
||||
struct ec_keypair {
|
||||
ec_privkey_t secret;
|
||||
ec_pubkey_t pub;
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates a keypair using the secp256k1 curve.
|
||||
* public key is in compressed format.
|
||||
|
|
|
|||
11
src/types.h
11
src/types.h
|
|
@ -24,6 +24,8 @@
|
|||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
#include <array>
|
||||
|
||||
#define EC_PRIVKEY_SIZE 32
|
||||
|
||||
/*
|
||||
|
|
@ -33,4 +35,13 @@
|
|||
*/
|
||||
#define EC_PUBKEY_SIZE (32 + 1)
|
||||
|
||||
|
||||
typedef std::array<unsigned char, EC_PRIVKEY_SIZE> ec_privkey_t;
|
||||
typedef std::array<unsigned char, EC_PUBKEY_SIZE> ec_pubkey_t;
|
||||
|
||||
struct ec_keypair {
|
||||
ec_privkey_t secret;
|
||||
ec_pubkey_t pub;
|
||||
};
|
||||
|
||||
#endif /* TYPES_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue