convertDerToPem

fun ByteArray.convertDerToPem(keyType: String = "PRIVATE KEY"): String(source)

Encodes these DER-encoded key bytes as a PEM string, wrapping the Base64 body in -----BEGIN/END [keyType]----- markers.