operator/src/main/java/oracle/kubernetes/operator/steps/ReadHealthStep.java
private static String createEncodedCredentials(final byte[] username, final byte[] password) {
    // Get encoded credentials with authentication information.
    String encodedCredentials = null;
    if (username != null && password != null) {
      byte[] usernameAndPassword = new byte[username.length + password.length + 1];
      System.arraycopy(username, 0, usernameAndPassword, 0, username.length);
      usernameAndPassword[username.length] = (byte) ':';
      System.arraycopy(password, 0, usernameAndPassword, username.length + 1, password.length);
      encodedCredentials = java.util.Base64.getEncoder().encodeToString(usernameAndPassword);
    }
    return encodedCredentials;
  }
/**
   * Create encoded credentials from username and password.
   *
   * @param username Username
   * @param password Password
   * @return encoded credentials
   */
Create encoded credentials from username and password.
@param username Username
@param password Password
@return encoded credentials
Create encoded credentials from username and password . @param username Username @param password Password @return encoded credentials
private static String createEncodedCredentials(final byte[] username, final byte[] password) {
    String encodedCredentials = null;
    if (username != null && password != null) {
      byte[] usernameAndPassword = new byte[username.length + password.length + 1];
      System.arraycopy(username, 0, usernameAndPassword, 0, username.length);
      usernameAndPassword[username.length] = (byte) ':';
      System.arraycopy(password, 0, usernameAndPassword, username.length + 1, password.length);
      encodedCredentials = java.util.Base64.getEncoder().encodeToString(usernameAndPassword);
    }
    return encodedCredentials;
  }
private static String createEncodedCredentials ( final byte [ ] username , final byte [ ] password ) { String encodedCredentials = null ; if ( username != null && password != null ) { byte [ ] usernameAndPassword = new byte [ username . length + password . length + 1 ] ; System . arraycopy ( username , 0 , usernameAndPassword , 0 , username . length ) ; usernameAndPassword [ username . length ] = ( byte ) ':' ; System . arraycopy ( password , 0 , usernameAndPassword , username . length + 1 , password . length ) ; encodedCredentials = java . util . Base64 . getEncoder ( ) . encodeToString ( usernameAndPassword ) ; } return encodedCredentials ; }
Create encoded credentials from username and password.
Create encoded credentials from username and password .
// Get encoded credentials with authentication information.