Add chan to encrypt method.