Updated business logic of the CryptoService