Skip navigation links

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.6.0)

E17060-03


oracle.odi.domain.util
Class ObfuscatedString

java.lang.Object
  extended by oracle.odi.domain.util.ObfuscatedString


public final class ObfuscatedString
extends java.lang.Object

An obfuscated string.

ODI domain layer uses this class to model a string that is obfuscated. Typical obfuscated strings are passwords and credentials.

An instance of ObfuscatedString doesn't offer any additional method and primarily provides type safety and is a convenient holder for a string that is obfuscated.

Since:
11.1.1.3.0

Method Summary
static ObfuscatedString obfuscate(char[] pStringToObfuscate)
          Creates an ObfuscatedString instance from the given not obfuscated password as a char array.
static ObfuscatedString obfuscate(java.lang.String pStringToObfuscate)
          Deprecated. use obfuscate(char[]) instead for better security
 java.lang.String toString()
          Returns a String object representing this ObfuscatedString.
static ObfuscatedString valueOf(java.lang.String pObfuscatedString)
          Creates an ObfuscatedString instance from the string standard representation as described in the toString() method.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Method Detail

obfuscate

public static ObfuscatedString obfuscate(java.lang.String pStringToObfuscate)
Deprecated. use obfuscate(char[]) instead for better security
Creates an ObfuscatedString instance from the given not obfuscated string.

Note that the given string must not be null. In order to create an ObfuscatedString for an empty password, the empty string (i.e. "") must be used.

Parameters:
pStringToObfuscate - the string to obfuscate
Returns:
the obfuscated string as an ObfuscatedString instance
Throws:
DomainRuntimeException - if the given string is null

obfuscate

public static ObfuscatedString obfuscate(char[] pStringToObfuscate)
Creates an ObfuscatedString instance from the given not obfuscated password as a char array.

Note that the given char array must not be null. In order to create an ObfuscatedString for an empty password, the empty string (i.e. "") must be used.

After calling this method the caller needs to make sure to reset all chars of the the passed in char array if it is sensitive info e.g. password.

Parameters:
pStringToObfuscate - the string to obfuscate
Returns:
the obfuscated string as an ObfuscatedString instance
Throws:
DomainRuntimeException - if the given char array is null
Since:
11.1.1.5.0

valueOf

public static ObfuscatedString valueOf(java.lang.String pObfuscatedString)
Creates an ObfuscatedString instance from the string standard representation as described in the toString() method.
Parameters:
pObfuscatedString - the already obfuscated String
Returns:
an instance of ObfuscatedString holding the given obfuscated string
Throws:
DomainRuntimeException - if the given string is null

toString

public java.lang.String toString()
Returns a String object representing this ObfuscatedString.
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

Skip navigation links

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.6.0)

E17060-03


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.