* result * * Description: * This function will return the 160-bit message digest into the * array provided. * * Parameters: * message_digest_array: [out] * This is an array of five unsigned integers which will be filled * with the message digest that has been computed. * * Returns: * True if successful, false if it failed. * *
| 135 | * |
| 136 | */ |
| 137 | bool sha1::result2(unsigned int *message_digest_array) |
| 138 | { |
| 139 | int i; // Counter |
| 140 | |
| 141 | if (corrupted_) { |
| 142 | return false; |
| 143 | } |
| 144 | |
| 145 | if (!computed_) { |
| 146 | pad_message(); |
| 147 | computed_ = true; |
| 148 | } |
| 149 | |
| 150 | for(i = 0; i < 5; i++) { |
| 151 | message_digest_array[i] = h_[i]; |
| 152 | } |
| 153 | |
| 154 | return true; |
| 155 | } |
| 156 | |
| 157 | bool sha1::result(unsigned char *message_digest_array) |
| 158 | { |