diff --git a/core/c/mpw-types.c b/core/c/mpw-types.c index ad74b057..fd144bbb 100644 --- a/core/c/mpw-types.c +++ b/core/c/mpw-types.c @@ -22,6 +22,9 @@ #include "mpw-types.h" #include "mpw-util.h" +const size_t MPMasterKeySize = 64; +const size_t MPSiteKeySize = 256 / 8; // Size of HMAC-SHA-256 + const MPResultType mpw_typeWithName(const char *typeName) { // Find what password type is represented by the type letter. diff --git a/core/c/mpw-types.h b/core/c/mpw-types.h index fa56c819..95208040 100644 --- a/core/c/mpw-types.h +++ b/core/c/mpw-types.h @@ -35,10 +35,8 @@ //// Types. -#define MPMasterKeySize 64 /* bytes */ -typedef const uint8_t *MPMasterKey; -#define MPSiteKeySize (256 / 8) /* bytes */ // Size of HMAC-SHA-256 -typedef const uint8_t *MPSiteKey; +extern const size_t MPMasterKeySize, MPSiteKeySize; /* bytes */ +typedef const uint8_t *MPMasterKey, *MPSiteKey; typedef const char *MPKeyID; typedef mpw_enum( uint8_t, MPKeyPurpose ) {