| 188 | **********************************************************************/ |
| 189 | |
| 190 | int msGenerateEncryptionKey(unsigned char *k) |
| 191 | { |
| 192 | int i; |
| 193 | |
| 194 | /* Use current time as seed for rand() */ |
| 195 | srand( (unsigned int) time( NULL )); |
| 196 | |
| 197 | for(i=0; i<MS_ENCRYPTION_KEY_SIZE; i++) |
| 198 | k[i] = (unsigned char)rand(); |
| 199 | |
| 200 | return MS_SUCCESS; |
| 201 | } |
| 202 | |
| 203 | /********************************************************************** |
| 204 | * msReadEncryptionKeyFromFile() |