add packaging
[platform/upstream/nettle.git] / testsuite / twofish-test.c
1 #include "testutils.h"
2 #include "twofish.h"
3
4 void
5 test_main(void)
6 {
7   /* 128 bit key */
8   test_cipher(&nettle_twofish128,
9               SHEX("0000000000000000 0000000000000000"),
10               SHEX("0000000000000000 0000000000000000"),
11               SHEX("9F589F5CF6122C32 B6BFEC2F2AE8C35A"));
12
13   /* 192 bit key */
14   test_cipher(&nettle_twofish192,
15               SHEX("0123456789ABCDEF FEDCBA9876543210"
16                    "0011223344556677"),
17               SHEX("0000000000000000 0000000000000000"),
18               SHEX("CFD1D2E5A9BE9CDF 501F13B892BD2248"));
19
20   /* 256 bit key */
21   test_cipher(&nettle_twofish256,
22               SHEX("0123456789ABCDEF FEDCBA9876543210"
23                    "0011223344556677 8899AABBCCDDEEFF"),
24               SHEX("0000000000000000 0000000000000000"),
25               SHEX("37527BE0052334B8 9F0CFCCAE87CFA20"));
26 }