拦截jQuery ajax

If I am going to encrypt the data being passed by jQuery ajax prior to sending to the network (regardless if the network is SSL'd or not), where can I inject that functionality?

Well, jQuery.ajax has a data field, which corresponds to the data sent in your request. So cleanest would be to set this field as a call to your encoding function.

$.ajax({
    ...
    data: yourDataEncodingFunction(),
    ...
});

Remember data must be Key/Value pairs, so be sure that's what your function returns.

You can intercept all ajax queries initiated by jQuery, examine their content and change them (encrypt in your case) by using ajax prefilter in jQuery. With is approach you can modify all requests' contents at one place globally.

Details: http://api.jquery.com/jQuery.ajaxPrefilter/