View amazon_appstore_submission.py
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
import requests | |
import sys | |
from pathlib import Path | |
# Arguments you need to provide: | |
# 1.- client_id = Amazon client API id | |
# 2.- client_secret = Amazon client API secret | |
# 3.- app_id = Amazon app id | |
# 4.- local_apk_path = Path for the apk file to submit | |
arguments = sys.argv |
View ECDH + Bouncy Castle
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
public class SessionController { | |
private static final String BOB = "bob"; | |
private static final String ALICE = "alice"; | |
private static final String KEY_PUBLIC = "KEY_PUBLIC"; | |
private static final String KEY_PRIVATE = "KEY_PRIVATE"; | |
private static final String PROVIDER = "SC"; | |
private static final String CURVE = "secp256K1"; | |
private static final String ALGORITHM = "ECDH"; | |
private final ECParameterSpec ecNamedCurveParameterSpec = ECNamedCurveTable.getParameterSpec(CURVE); |
View ECDH_BC.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
import java.math.BigInteger; | |
import java.security.PublicKey; | |
import java.security.PrivateKey; | |
import java.security.KeyFactory; | |
import java.security.Security; | |
import java.security.KeyPairGenerator; | |
import java.security.KeyPair; | |
import java.security.SecureRandom; | |
import java.security.spec.PKCS8EncodedKeySpec; | |
import java.security.spec.ECGenParameterSpec; |
View gist:8acf304408393ae17ed3
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
import android.util.Log; | |
import java.io.IOException; | |
import retrofit2.Call; | |
import retrofit2.Callback; | |
import retrofit2.Response; | |
/** |
View Retrofit 2.0 Callback
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
import android.util.Log; | |
import com.google.gson.Gson; | |
import com.google.gson.annotations.SerializedName; | |
import java.io.IOException; | |
import retrofit.Callback; | |
import retrofit.Response; | |
import retrofit.Retrofit; |
View maven.gradle
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
apply plugin: 'maven' | |
apply plugin: 'signing' | |
def isReleaseBuild() { | |
return VERSION_NAME.contains("SNAPSHOT") == false | |
} | |
def getReleaseRepositoryUrl() { | |
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | |
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" |