improves crypto functions