Created
July 10, 2022 21:27
-
-
Save SerggioC/16e7bf32e271b537677af48e6b8fdb17 to your computer and use it in GitHub Desktop.
byte array to Hex String
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
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