Enhances application communication security using an SDK requiring account and API credentials, featuring dependency integration, HTTP client protection, and detailed logging capabilities.
ShieldCert is a library that helps you protect your application's communications.
👉 Full documentation is available at docs.shieldcert.com.
Add the dependency from Maven Central:
dependencies {
implementation("com.shieldcert:core:0.1.0")
}
val config = ShieldCertConfig(
publicKey = "-----BEGIN PUBLIC KEY-----.......-----END PUBLIC KEY-----\n",
apiKey = "API_KEY",
expiredTimeout = 60.toDuration(DurationUnit.MINUTES)
)
ShieldCert.initSDK(
application, //APLICATION/CONTEXT/ACTIVITY
config
)
// Protect
val http = HttpClient(CIO) {
install(ContentNegotiation) {
json()
}
install(Logging) {
logger = Logger.ANDROID
level = LogLevel.HEADERS
}
engine {
sslEngine()
}
}
try {
val txt = http.get("https://tls-v1-2.badssl.com:1012").bodyAsText()
println(txt)
} catch (e: Exception) {
e.printStackTrace()
}
ShieldCert is a library that helps you protect your application's communications.
👉 Full documentation is available at docs.shieldcert.com.
Add the dependency from Maven Central:
dependencies {
implementation("com.shieldcert:core:0.1.0")
}
val config = ShieldCertConfig(
publicKey = "-----BEGIN PUBLIC KEY-----.......-----END PUBLIC KEY-----\n",
apiKey = "API_KEY",
expiredTimeout = 60.toDuration(DurationUnit.MINUTES)
)
ShieldCert.initSDK(
application, //APLICATION/CONTEXT/ACTIVITY
config
)
// Protect
val http = HttpClient(CIO) {
install(ContentNegotiation) {
json()
}
install(Logging) {
logger = Logger.ANDROID
level = LogLevel.HEADERS
}
engine {
sslEngine()
}
}
try {
val txt = http.get("https://tls-v1-2.badssl.com:1012").bodyAsText()
println(txt)
} catch (e: Exception) {
e.printStackTrace()
}