Add explicit encoding to crypto calls for 0.10 compatibility