~ubuntu-branches/ubuntu/vivid/nettle/vivid-proposed

« back to all changes in this revision

Viewing changes to testsuite/gosthash94-test.c

  • Committer: Package Import Robot
  • Author(s): Magnus Holmgren
  • Date: 2013-03-24 11:38:21 UTC
  • mfrom: (1.5.2)
  • mto: (8.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20130324113821-47kc1q7ojsxmuevv
Tags: 2.6-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "testutils.h"
 
2
#include "gosthash94.h"
 
3
 
 
4
/* Using test vectors from Wikipedia article on GOST */
 
5
 
 
6
void
 
7
test_main(void)
 
8
{
 
9
  test_hash(&nettle_gosthash94, SDATA("The quick brown fox jumps over the lazy dog"),
 
10
            SHEX("77b7fa410c9ac58a25f49bca7d0468c9296529315eaca76bd1a10f376d1f4294"));
 
11
 
 
12
  test_hash(&nettle_gosthash94, SDATA("message digest"),
 
13
            SHEX("ad4434ecb18f2c99b60cbe59ec3d2469582b65273f48de72db2fde16a4889a4d"));
 
14
 
 
15
  test_hash(&nettle_gosthash94, SDATA("a"),
 
16
            SHEX("d42c539e367c66e9c88a801f6649349c21871b4344c6a573f849fdce62f314dd"));
 
17
 
 
18
  test_hash(&nettle_gosthash94, SDATA(""),
 
19
            SHEX("ce85b99cc46752fffee35cab9a7b0278abb4c2d2055cff685af4912c49490f8d"));
 
20
}