2
0

Swift-compatible typing.

This commit is contained in:
Maarten Billemont 2018-03-24 15:14:00 -04:00
parent c0107fb90e
commit 035bb6b285
2 changed files with 5 additions and 4 deletions

View File

@ -22,6 +22,9 @@
#include "mpw-types.h" #include "mpw-types.h"
#include "mpw-util.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) { const MPResultType mpw_typeWithName(const char *typeName) {
// Find what password type is represented by the type letter. // Find what password type is represented by the type letter.

View File

@ -35,10 +35,8 @@
//// Types. //// Types.
#define MPMasterKeySize 64 /* bytes */ extern const size_t MPMasterKeySize, MPSiteKeySize; /* bytes */
typedef const uint8_t *MPMasterKey; typedef const uint8_t *MPMasterKey, *MPSiteKey;
#define MPSiteKeySize (256 / 8) /* bytes */ // Size of HMAC-SHA-256
typedef const uint8_t *MPSiteKey;
typedef const char *MPKeyID; typedef const char *MPKeyID;
typedef mpw_enum( uint8_t, MPKeyPurpose ) { typedef mpw_enum( uint8_t, MPKeyPurpose ) {