Move adb to C++.
I keep trying to clean things up and needing std::strings. Might as
well just do this now.
usb_linux_client.c is going to stay as C because GCC isn't smart
enough to deal with the designated initializers it uses (though for
some reason it is in C mode).
The Darwin files are staying as C because I don't have a way to test
that they build.
The Windows files are staying as C because while I can actually build
for them, it's slow and painful.
Change-Id: I75367d29205a9049d34460032b3bb36384f43941
diff --git a/adb/adb_auth.h b/adb/adb_auth.h
index cece5e3..1487287 100644
--- a/adb/adb_auth.h
+++ b/adb/adb_auth.h
@@ -40,7 +40,8 @@
#if ADB_HOST
-int adb_auth_sign(void *key, void *token, size_t token_size, void *sig);
+int adb_auth_sign(void *key, const unsigned char* token, size_t token_size,
+ unsigned char* sig);
void *adb_auth_nextkey(void *current);
int adb_auth_get_userkey(unsigned char *data, size_t len);
@@ -50,12 +51,15 @@
#else // !ADB_HOST
-static inline int adb_auth_sign(void* key, void *token, size_t token_size, void *sig) { return 0; }
+static inline int adb_auth_sign(void* key, const unsigned char* token,
+ size_t token_size, unsigned char* sig) {
+ return 0;
+}
static inline void *adb_auth_nextkey(void *current) { return NULL; }
static inline int adb_auth_get_userkey(unsigned char *data, size_t len) { return 0; }
int adb_auth_generate_token(void *token, size_t token_size);
-int adb_auth_verify(void *token, void *sig, int siglen);
+int adb_auth_verify(uint8_t* token, uint8_t* sig, int siglen);
void adb_auth_confirm_key(unsigned char *data, size_t len, atransport *t);
#endif // ADB_HOST