Removed chunk_from_buf() in favor of a simpler chunk_from_chars() macro

This commit is contained in:
Martin Willi
2009-09-11 15:39:35 +02:00
parent 3a7bd9bd49
commit 3b878dae7e
29 changed files with 207 additions and 389 deletions
+2 -3
View File
@@ -25,8 +25,6 @@ static void usage()
exit(1);
}
static char data_buf[] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07};
int main(int argc, char *argv[])
{
private_key_t *private;
@@ -36,7 +34,7 @@ int main(int argc, char *argv[])
char buf[8096], *pos = buf;
key_type_t type = KEY_ANY;
signature_scheme_t scheme = SIGN_UNKNOWN;
chunk_t keydata, *sigs, data = chunk_from_buf(data_buf);
chunk_t keydata, *sigs, data;
if (argc < 4)
{
@@ -102,6 +100,7 @@ int main(int argc, char *argv[])
sigs = malloc(sizeof(chunk_t) * rounds);
data = chunk_from_chars(0x01,0x02,0x03,0x04,0x05,0x06,0x07);
start_timing(&timing);
for (round = 0; round < rounds; round++)
{