com.ybo.trackingplugin.Utils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of traceplugin Show documentation
Show all versions of traceplugin Show documentation
gradle plugin allowing to add automatic logs (or other process) at the start of each traced method
package com.ybo.trackingplugin
import java.util.Base64
fun String.toB64(): String {
val bytes = this.toByteArray()
val encodedBytes = Base64.getEncoder().encode(bytes)
return String(encodedBytes)
}
fun String.decodedFromB64(): String {
val decodedBytes = Base64.getDecoder().decode(this)
return String(decodedBytes)
}