<html> <head> <title>embedded IPsec - IPsec library</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="doxygen.css" type="text/css"> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="98%" border="0" align="center"> <tr> <td> <h2 align="left"><img src="logo_small.gif" alt="embedded IPsec"> source code documentation </h2> <hr> <!-- Generated by Doxygen 1.3.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> <h1>sha1_test.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2> Test functions for SHA1. <p> <dl compact><dt><b>Author:</b></dt><dd>Christian Scheurer <<a href="http://www.christianscheurer.ch">http://www.christianscheurer.ch</a>> <br> </dd></dl> <b>OUTLINE:</b><p> This file contains test functions used to verify the SHA1 code.<p> <b>IMPLEMENTATION:</b><p> There are no implementation hints to be mentioned.<p> <b>NOTES:</b><p> This document is part of <em>embedded IPsec<br> Copyright (c) 2003 Niklaus Schild and Christian Scheurer, HTI Biel/Bienne<br> All rights reserved.</em><hr> <p> Definition in file <a class="el" href="sha1__test_8c-source.html">sha1_test.c</a>. <p> <code>#include <string.h></code><br> <code>#include "<a class="el" href="util_8h-source.html">ipsec/util.h</a>"</code><br> <code>#include "<a class="el" href="sha1_8h-source.html">ipsec/sha1.h</a>"</code><br> <code>#include "<a class="el" href="debug_8h-source.html">ipsec/debug.h</a>"</code><br> <code>#include "<a class="el" href="structural__test_8h-source.html">testing/structural/structural_test.h</a>"</code><br> <p> <a href="sha1__test_8c-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="sha1__test_8c.html#a0">sha1_test_SHA1_Init</a> (void)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="sha1__test_8c.html#a1">sha1_test_SHA1_Update</a> (void)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="sha1__test_8c.html#a2">sha1_test_SHA1_Final</a> (void)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="sha1__test_8c.html#a3">sha1_test</a> (<a class="el" href="structtest__result__struct.html">test_result</a> *global_results)</td></tr> </table> <hr><h2>Function Documentation</h2> <a class="anchor" name="a3" doxytag="sha1_test.c::sha1_test" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void sha1_test </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structtest__result__struct.html">test_result</a> * </td> <td class="mdname1" valign="top" nowrap> <em>global_results</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Main test function for the SHA1 tests. It does nothing but calling the subtests one after the other. <p> Definition at line <a class="el" href="sha1__test_8c-source.html#l00268">268</a> of file <a class="el" href="sha1__test_8c-source.html">sha1_test.c</a>. </td> </tr> </table> <a class="anchor" name="a2" doxytag="sha1_test.c::sha1_test_SHA1_Final" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int sha1_test_SHA1_Final </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Test the <a class="el" href="sha1_8c.html#a34">SHA1_Final()</a> function <dl compact><dt><b>Returns:</b></dt><dd>int number of tests failed in this function </dd></dl> <p> Definition at line <a class="el" href="sha1__test_8c-source.html#l00195">195</a> of file <a class="el" href="sha1__test_8c-source.html">sha1_test.c</a>. </td> </tr> </table> <a class="anchor" name="a0" doxytag="sha1_test.c::sha1_test_SHA1_Init" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int sha1_test_SHA1_Init </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Test the <a class="el" href="sha1_8c.html#a35">SHA1_Init()</a> function <dl compact><dt><b>Returns:</b></dt><dd>int number of tests failed in this function </dd></dl> <p> Definition at line <a class="el" href="sha1__test_8c-source.html#l00062">62</a> of file <a class="el" href="sha1__test_8c-source.html">sha1_test.c</a>. </td> </tr> </table> <a class="anchor" name="a1" doxytag="sha1_test.c::sha1_test_SHA1_Update" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int sha1_test_SHA1_Update </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Test the <a class="el" href="sha1_8c.html#a32">SHA1_Update()</a> function <dl compact><dt><b>Returns:</b></dt><dd>int number of tests failed in this function </dd></dl> <p> Definition at line <a class="el" href="sha1__test_8c-source.html#l00108">108</a> of file <a class="el" href="sha1__test_8c-source.html">sha1_test.c</a>. </td> </tr> </table> </td> </tr> </table> <hr> <div align="center">Copyright 2003 by Christian Scheurer and Niklaus Schild</div> </html>