various kdfs: Always reset buflen after clearing the buffer