| 155 | /* Initialize the SHS values */ |
| 156 | |
| 157 | void shsInit(SHS_INFO* shsInfo) |
| 158 | { |
| 159 | /* Set the h-vars to their initial values */ |
| 160 | shsInfo->digest[ 0 ] = h0init; |
| 161 | shsInfo->digest[ 1 ] = h1init; |
| 162 | shsInfo->digest[ 2 ] = h2init; |
| 163 | shsInfo->digest[ 3 ] = h3init; |
| 164 | shsInfo->digest[ 4 ] = h4init; |
| 165 | |
| 166 | /* Initialise bit count */ |
| 167 | shsInfo->countLo = shsInfo->countHi = 0L; |
| 168 | } |
| 169 | |
| 170 | /* Perform the SHS transformation. Note that this code, like MD5, seems to |
| 171 | break some optimizing compilers - it may be necessary to split it into |