Scala – Convert Base64 to Hex String

import java.util.Base64
import org.apache.commons.codec.binary.Hex

val guid: String = "YxRfXk827kPgkmMUX15PNg=="
val decoded: Array[Byte] = Base64.getDecoder.decode(guid)
val hexString: String = Hex.encodeHexString(decoded)

output

guid: String = YxRfXk827kPgkmMUX15PNg==
decoded: Array[Byte] = Array(99, 20, 95, 94, 79, 54, -18, 67, -32, -110, 99, 20, 95, 94, 79, 54)
hexString: String = 63145f5e4f36ee43e09263145f5e4f36