阅读背景:

如何在C中通过命令行接受md5sum?

来源:互联网 
typedef union
{
    uint ui[4];
} md5hash;

void main(void)
{
    int opt;

    while ((opt = getopt(argc, argv, "c:t:s:h:")) != -1) {
        switch (opt) {
        case 'h':
            hash = optarg;
            break;
        default: /* '?' */
            exit(EXIT_FAILURE);
        }
    }

    md5hash hash;

    sscanf(hash, "%x%x%x%x", &hash.ui);
}
typedef union
{
    uint ui[4];
} md5hash;

voi



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: