We encounter similar difficulties with working with digests. Please check if the situation with shorter digest is related to 0x20 bytes (space character) at the end of digest. Similar situation is when you have hashID = md5('a98');
l = length (hashid);
output;
hashID = md5('a99');
l = length (hashid);
output; First case generates digest with 0x20 at last character and this causes some issues with e.g. length function or further exporting.
... View more