So there is a problem with the function "cvt_bin"

static inline void cvt_bin(HASHHEX hex, HASH bin)
{
        unsigned short i;
        unsigned char j;
        for (i = 0; i<HASHLEN; i++) {
                if(hex[2*i]>='0' && hex[2*i]<='9')
                        j = (hex[2*i]-'0') << 4;
                else if(hex[2*i]>='a'&&hex[2*i]<='f')
                        j = (hex[2*i]-'a'+10) << 4;
                else if(hex[2*i]>='A'&&hex[2*i]<='F')
                        j = (hex[2*i]-'A'+10) << 4;
                else j = 0;

                if(hex[2*i+1]>='0'&&hex[2*i+1]<='9')
                        j += hex[2*i+1]-'0';
                else if(hex[2*i+1]>='a'&&hex[2*i+1]<='f')
                        j += hex[2*i+1]-'a'+10;
                else if(hex[2*i+1]>='A'&&hex[2*i+1]<='F')
                        j += hex[2*i+1]-'A'+10;

                bin[i] = j;
        }
}


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.