mtd: seama: move buf allocation to the MD5 function