| 156 | } |
| 157 | |
| 158 | char *db_key(char *secret, char *domain, char *id) |
| 159 | { |
| 160 | char buf[1024]; |
| 161 | char *hash; |
| 162 | |
| 163 | snprintf(buf, sizeof(buf), "%s", secret); |
| 164 | hash = shahash(buf); |
| 165 | |
| 166 | snprintf(buf, sizeof(buf), "%s%s", hash, domain); |
| 167 | hash = shahash(buf); |
| 168 | |
| 169 | snprintf(buf, sizeof(buf), "%s%s", hash, id); |
| 170 | hash = shahash(buf); |
| 171 | return hash; |
| 172 | } |
| 173 |
no test coverage detected