Randomize a string in C

前端 未结 3 1035
被撕碎了的回忆
被撕碎了的回忆 2021-02-06 10:59

I\'m trying to generate random permutations of an 80-character fixed string in C. Much to my dismay, the system I\'m working on lacks strfry(). What\'s the best way for me to

3条回答
  •  礼貌的吻别
    2021-02-06 11:29

    void gcry_randomize (unsigned char *buffer, size_t length, enum gcry_random_level level)

    Fill buffer with length random bytes using a random quality as defined by level.

    http://www.g10code.com/p-libgcrypt.html

提交回复
热议问题