Added null to buffer in crypt()