class ActiveRecord::Encryption::Encryptor

def encrypted?(text)

Returns whether the text is encrypted or not
def encrypted?(text)
  deserialize_message(text)
  true
rescue Errors::Encoding, *DECRYPT_ERRORS
  false
end