Diff

Differences From Artifact [5f01203690]:

To Artifact [a03e9d2d38]:


    34     34   /*
    35     35    *  Define the SHA1 circular left shift macro
    36     36    */
    37     37   #define SHA1CircularShift(bits,word) \
    38     38                   (((word) << (bits)) | ((word) >> (32-(bits))))
    39     39   
    40     40   /* Local Function Prototyptes */
    41         -void SHA1PadMessage(SHA1Context *);
    42         -void SHA1ProcessMessageBlock(SHA1Context *);
           41  +static void SHA1PadMessage(SHA1Context *);
           42  +static void SHA1ProcessMessageBlock(SHA1Context *);
    43     43   
    44     44   /*
    45     45    *  SHA1Reset
    46     46    *
    47     47    *  Description:
    48     48    *      This function will initialize the SHA1Context in preparation
    49     49    *      for computing a new SHA1 message digest.
................................................................................
    52     52    *      context: [in/out]
    53     53    *          The context to reset.
    54     54    *
    55     55    *  Returns:
    56     56    *      sha Error Code.
    57     57    *
    58     58    */
    59         -int SHA1Reset(SHA1Context *context)
           59  +static int SHA1Reset(SHA1Context *context)
    60     60   {
    61     61       if (!context)
    62     62       {
    63     63           return shaNull;
    64     64       }
    65     65   
    66     66       context->Length_Low             = 0;
................................................................................
    94     94    *      Message_Digest: [out]
    95     95    *          Where the digest is returned.
    96     96    *
    97     97    *  Returns:
    98     98    *      sha Error Code.
    99     99    *
   100    100    */
   101         -int SHA1Result( SHA1Context *context,
          101  +static int SHA1Result( SHA1Context *context,
   102    102                   uint8_t Message_Digest[SHA1HashSize])
   103    103   {
   104    104       int i;
   105    105   
   106    106       if (!context || !Message_Digest)
   107    107       {
   108    108           return shaNull;
................................................................................
   151    151    *      length: [in]
   152    152    *          The length of the message in message_array
   153    153    *
   154    154    *  Returns:
   155    155    *      sha Error Code.
   156    156    *
   157    157    */
   158         -int SHA1Input(    SHA1Context    *context,
          158  +static int SHA1Input(    SHA1Context    *context,
   159    159                     const uint8_t  *message_array,
   160    160                     unsigned       length)
   161    161   {
   162    162       if (!length)
   163    163       {
   164    164           return shaSuccess;
   165    165       }
................................................................................
   223    223    *  Comments:
   224    224    *      Many of the variable names in this code, especially the
   225    225    *      single character names, were used because those were the
   226    226    *      names used in the publication.
   227    227    *
   228    228    *
   229    229    */
   230         -void SHA1ProcessMessageBlock(SHA1Context *context)
          230  +static void SHA1ProcessMessageBlock(SHA1Context *context)
   231    231   {
   232    232       const uint32_t K[] =    {       /* Constants defined in SHA-1   */
   233    233                               0x5A827999,
   234    234                               0x6ED9EBA1,
   235    235                               0x8F1BBCDC,
   236    236                               0xCA62C1D6
   237    237                               };
................................................................................
   333    333    *      ProcessMessageBlock: [in]
   334    334    *          The appropriate SHA*ProcessMessageBlock function
   335    335    *  Returns:
   336    336    *      Nothing.
   337    337    *
   338    338    */
   339    339   
   340         -void SHA1PadMessage(SHA1Context *context)
          340  +static void SHA1PadMessage(SHA1Context *context)
   341    341   {
   342    342       /*
   343    343        *  Check to see if the current message block is too small to hold
   344    344        *  the initial padding bits and length.  If so, we will pad the
   345    345        *  block, process it, and then continue padding into a second
   346    346        *  block.
   347    347        */