Credentials.smali 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. .class public final Lokhttp3/Credentials;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # direct methods
  5. .method private constructor <init>()V
  6. .locals 0
  7. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  8. return-void
  9. .end method
  10. .method public static basic(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
  11. .locals 1
  12. sget-object v0, Lokhttp3/internal/Util;->ISO_8859_1:Ljava/nio/charset/Charset;
  13. invoke-static {p0, p1, v0}, Lokhttp3/Credentials;->basic(Ljava/lang/String;Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String;
  14. move-result-object p0
  15. return-object p0
  16. .end method
  17. .method public static basic(Ljava/lang/String;Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String;
  18. .locals 1
  19. new-instance v0, Ljava/lang/StringBuilder;
  20. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  21. invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  22. const-string p0, ":"
  23. invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  24. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  25. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  26. move-result-object p0
  27. invoke-static {p0, p2}, Lokio/ByteString;->encodeString(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;
  28. move-result-object p0
  29. invoke-virtual {p0}, Lokio/ByteString;->base64()Ljava/lang/String;
  30. move-result-object p0
  31. new-instance p1, Ljava/lang/StringBuilder;
  32. invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
  33. const-string p2, "Basic "
  34. invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  35. invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  36. invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  37. move-result-object p0
  38. return-object p0
  39. .end method