change ret to bytes in cryptHelper