add encoding to crypto update