code: function encrypt (str) {
      var cipher = crypto.createCipher(algorithm, key)
        , crypted = cipher.update(str, from, to) + cipher.final(to)
      return crypted;
    }
docs: Encrypt a string with the options provided