0

So my binary is: 0011010101100100001101000011000100110100001100000011001001100001011000100110001100110100011000100011001001100001001101110011011001100010001110010011011100110001001110010110010000111001001100010011000100110000001100010011011101100011001101010011100100110010

Md5: 5d41402abc4b2a76b9719d911017c592

Password: hello

I know the datatype is BINARY in mysql but what size do i need to make it? what do i fill in for the x?

BINARY(x)

2 Answers 2

1

According to this, you can predict the size of a md5.

If you don't want to, it seems like VARBINARY type is what you're looking for.

Sign up to request clarification or add additional context in comments.

2 Comments

According to this en.wikipedia.org/wiki/MD5 and what you linked me to, you can predict the size of a md5 hash. an md5 hash is always a 32 character string. and no, i want to store my Binary as a Binary in MYSQL.
Ok I really missunderstood your question. Sorry about that, Richard Grant has the answer you're looking for.
1

According to the MANUAL:

[...] the length for BINARY and VARBINARY is a length in bytes rather than in characters.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.