diff options
Diffstat (limited to 'pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java')
-rw-r--r-- | pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java index 42e38af54..27a39cb6f 100644 --- a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java +++ b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java @@ -22,30 +22,32 @@ import java.io.IOException; import java.util.Enumeration; import java.util.Properties; -public class PlainPasswordReader implements IPasswordReader { +public class PlainPasswordReader implements IPasswordReader{ private String mPwdPath = ""; private Properties mPwdStore; public PlainPasswordReader() { } - public void init(String pwdPath) throws IOException { - mPwdStore = new Properties(); - // initialize mPwdStore - mPwdPath = pwdPath; - mPwdStore = new Properties(); + public void init(String pwdPath) + throws IOException + { + mPwdStore = new Properties(); + // initialize mPwdStore + mPwdPath = pwdPath; + mPwdStore = new Properties(); - FileInputStream file = new FileInputStream(mPwdPath); - mPwdStore.load(file); - file.close(); + FileInputStream file = new FileInputStream(mPwdPath); + mPwdStore.load(file); + file.close(); } public String getPassword(String tag) { - return (String) mPwdStore.getProperty(tag); + return (String) mPwdStore.getProperty(tag); } // return an array of String-based tag public Enumeration getTags() { - return mPwdStore.propertyNames(); + return mPwdStore.propertyNames(); } } |