這是我的代碼:產生隨機的長簽名ç
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <crypt.h>
#include <string.h>
#include <stdlib.h>
int main(void){
int i;
unsigned long seed[2];
/* Generate a (not very) random seed */
seed[0] = time(NULL);
seed[1] = getpid()^(seed[0] >> 14 & 0x30000);
printf("Seed 0: %lu ; Seed 1: %lu", seed[0], seed[1]);
return 0;
}
我要生成將用於成散列函數的一些非常隨機種子,但我不知道該怎麼辦了!
http://stackoverflow.com/questions/7920860/how-to-generate-large-random-numbers-c –