Fixed a problem where I was attempting to store an encryption of an empty string to the encrypted ip variable, rather than the input ip address.