api: Add byte[] methods for Trust/KeyManager Channel Credentials API
The TlsChannelCredentials.Builder reads all keyManager and trustManager overloaded input params to byte[] already. Add an option to pass byte[] directly.
Might make sense to do similar changes to: TlsServerCredentials.
How are you getting your certs/keys such that they are byte[]?
As a Base64 encoded Environment Variables running in a container based setup: Base64.getDecoder().decode(envVar). I can of course wrap the byte[] in a new ByteArrayInputStream() with practically no overhead since it's a one time thing.
Storing secrets in env vars is not something to encourage, but I do see how that's the path of least resistance and may not be a problem in some environments. Converting to InputStream is easy, except you have to catch the impossible IOException. Adding the byte[] methods are easy, but I'd feel better if we had a stronger or more frequent use case.