Replacing removed crypto package and removing deprecated ? operator.