Skip to content

Instantly share code, notes, and snippets.

@SerggioC
Created July 10, 2022 21:27
Show Gist options
  • Save SerggioC/16e7bf32e271b537677af48e6b8fdb17 to your computer and use it in GitHub Desktop.
Save SerggioC/16e7bf32e271b537677af48e6b8fdb17 to your computer and use it in GitHub Desktop.
byte array to Hex String
private fun bytesToHex(bytes: ByteArray): String {
val result = bytes.joinToString(separator = "") { eachByte ->
"%02x".format(eachByte)
}
return result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment