This repository has been archived by the owner on May 5, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add library to jcenter pkg name change
- Loading branch information
1 parent
914f6b0
commit 2b187fd
Showing
26 changed files
with
121 additions
and
141 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...abs/asynkioapp/ExampleInstrumentedTest.kt → ...ari/asynkioapp/ExampleInstrumentedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...yz/mystikolabs/asynkioapp/MainActivity.kt → ...ikhilchaudhari/asynkioapp/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...java/xyz/mystikolabs/asynkioapp/models.kt → ...a/me/nikhilchaudhari/asynkioapp/models.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package xyz.mystikolabs.asynkioapp | ||
package me.nikhilchaudhari.asynkioapp | ||
|
||
|
||
data class Data( | ||
|
2 changes: 1 addition & 1 deletion
2
...mystikolabs/asynkioapp/ExampleUnitTest.kt → ...ilchaudhari/asynkioapp/ExampleUnitTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package xyz.mystikolabs.asynkioapp | ||
package me.nikhilchaudhari.asynkioapp | ||
|
||
import org.junit.Test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/asynkioapp/ExampleInstrumentedTest.java → ...i/asynkioapp/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="xyz.mystikolabs.asynkio"/> | ||
package="me.nikhilchaudhari.asynkio"/> |
4 changes: 2 additions & 2 deletions
4
.../mystikolabs/asynkio/core/AsynkHandler.kt → ...hilchaudhari/asynkio/core/AsynkHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...z/mystikolabs/asynkio/core/AsynkioMain.kt → ...khilchaudhari/asynkio/core/AsynkioMain.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...z/mystikolabs/asynkio/core/NetworkCall.kt → ...khilchaudhari/asynkio/core/NetworkCall.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tikolabs/asynkio/core/SuspendExecution.kt → ...haudhari/asynkio/core/SuspendExecution.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...abs/asynkio/extensions/core_extensions.kt → ...ari/asynkio/extensions/core_extensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../asynkio/extensions/network_extensions.kt → .../asynkio/extensions/network_extensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
asynkio/src/main/java/me/nikhilchaudhari/asynkio/helper/auth.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package me.nikhilchaudhari.asynkio.helper | ||
|
||
import java.io.ByteArrayOutputStream | ||
|
||
|
||
fun String.encodeBase64ToString(): String = String(this.toByteArray().encodeBase64()) | ||
fun String.encodeBase64ToByteArray(): ByteArray = this.toByteArray().encodeBase64() | ||
fun ByteArray.encodeBase64ToString(): String = String(this.encodeBase64()) | ||
|
||
fun ByteArray.encodeBase64(): ByteArray { | ||
val table = (CharRange('A', 'Z') + CharRange('a', 'z') + CharRange('0', '9') + '+' + '/').toCharArray() | ||
val output = ByteArrayOutputStream() | ||
var padding = 0 | ||
var position = 0 | ||
while (position < this.size) { | ||
var b = this[position].toInt() and 0xFF shl 16 and 0xFFFFFF | ||
if (position + 1 < this.size) b = b or (this[position + 1].toInt() and 0xFF shl 8) else padding++ | ||
if (position + 2 < this.size) b = b or (this[position + 2].toInt() and 0xFF) else padding++ | ||
for (i in 0 until 4 - padding) { | ||
val c = b and 0xFC0000 shr 18 | ||
output.write(table[c].toInt()) | ||
b = b shl 6 | ||
} | ||
position += 3 | ||
} | ||
for (i in 0 until padding) { | ||
output.write('='.toInt()) | ||
} | ||
return output.toByteArray() | ||
} | ||
|
||
class BaseAuth(val user:String,val password:String):Auth{ | ||
override val header: Pair<String, String> | ||
get() { | ||
val b64 = "${this.user}:${this.password}".encodeBase64ToString() | ||
return "Authorization" to "Basic $b64" | ||
} | ||
} | ||
|
||
interface Auth{ | ||
val header:Pair<String,String> | ||
} |
2 changes: 1 addition & 1 deletion
2
...xyz/mystikolabs/asynkio/helper/headers.kt → ...nikhilchaudhari/asynkio/helper/headers.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../xyz/mystikolabs/asynkio/helper/params.kt → .../nikhilchaudhari/asynkio/helper/params.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package xyz.mystikolabs.asynkio.helper | ||
package me.nikhilchaudhari.asynkio.helper | ||
|
||
import java.net.URLEncoder | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
...yz/mystikolabs/asynkio/request/Request.kt → ...ikhilchaudhari/asynkio/request/Request.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ystikolabs/asynkio/request/RequestImpl.kt → ...lchaudhari/asynkio/request/RequestImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../mystikolabs/asynkio/response/Response.kt → ...hilchaudhari/asynkio/response/Response.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...tikolabs/asynkio/response/ResponseImpl.kt → ...haudhari/asynkio/response/ResponseImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 0 additions & 98 deletions
98
asynkio/src/main/java/xyz/mystikolabs/asynkio/helper/auth.kt
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...stikolabs/asynkioapp/ExampleUnitTest.java → ...chaudhari/asynkioapp/ExampleUnitTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package xyz.mystikolabs.asynkioapp; | ||
package me.nikhilchaudhari.asynkioapp; | ||
|
||
import org.junit.Test; | ||
|
||
|
Oops, something went wrong.