Skip to content

Instantly share code, notes, and snippets.

Balram Pandey balrampandey19

Block or report user

Report or block balrampandey19

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@balrampandey19
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 {
@Override
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.