updated use of crypto to avoid compile warnings