bf_test.c 383 Bytes
Newer Older
Niels Möller's avatar
Niels Möller committed
1
2
3
4
5
6
7
8
9
10
/* bf_test.c
 *
 * $Id$
 * Test the blow fish implementation. */

#include "blowfish.h"

#include <stdio.h>
#include <stdlib.h>

Niels Möller's avatar
Niels Möller committed
11
int main (int argc UNUSED, char **argv UNUSED)
Niels Möller's avatar
Niels Möller committed
12
13
14
15
{
  if (bf_selftest())
    {
      fprintf(stderr, "Blowfish works.\n");
Niels Möller's avatar
Niels Möller committed
16
      return EXIT_SUCCESS;
Niels Möller's avatar
Niels Möller committed
17
18
19
20
    }
  else
    {
      fprintf(stderr, "ERROR: Blowfish failed.\n");
Niels Möller's avatar
Niels Möller committed
21
      return EXIT_FAILURE;
Niels Möller's avatar
Niels Möller committed
22
23
24
    }
}