The message can be of whichever length, but the input requires 256 bits, and the message can be signed. The hash function used is SHA-256, and when a shorter hash is needed, RIPEMD-160 will be used. In Bitcoin, almost the entirety is hashed twice, double SHA-256 or SHA-256, and then RIPEMD-160 for short hash.