pkcs1-test.c 353 Bytes
Newer Older
1 2
#include "testutils.h"

3
#include "pkcs1.h"
4 5 6 7 8

int
test_main(void)
{
  uint8_t buffer[16];
9
  uint8_t expected[16] = { 0,    1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
10 11
			   0xff, 0xff, 0xff, 0xff, 0,    'a',  'b',  'c' };

12 13
  _pkcs1_signature_prefix(sizeof(buffer), buffer,
			  3, "abc", 0);
14 15 16 17 18

  ASSERT(MEMEQ(sizeof(buffer), buffer, expected));

  SUCCESS();
}