Skip to content

Instantly share code, notes, and snippets.

balrampandey19 / gist:96bdc04174e58ba3dd03c0aa6f7345af
Created Dec 29, 2016
Encrypt retrofit request body with SHA256
View gist:96bdc04174e58ba3dd03c0aa6f7345af
* Created by Balram Pandey on 12/29/16.
public class EncryptionInterceptor implements Interceptor {
private static final String TAG = EncryptionInterceptor.class.getSimpleName();
private static final boolean DEBUG = true;
View gist:da57598d2078b27bf802285d469a76c9
If you are using Protocol buffer or Flat buffer and want to get Byte String response for server-:
public class ToStringConverterFactory extends Converter.Factory {
public Converter<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) {
if (String.class.equals(type)) {
return new Converter<ResponseBody, String>() {
You can’t perform that action at this time.