Package hec.io

Class PasswordFile

java.lang.Object
hec.io.PasswordFile
All Implemented Interfaces:
AutoCloseable

public class PasswordFile extends Object implements AutoCloseable
  • Constructor Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • readFile

      protected boolean readFile()
      format of the file is # comments v1.0 first non comment line is the version identifier:encrypted username and password identifier:encrypted username and password identifier:encrypted username and password identifier:encrypted username and password
      Returns:
    • writeFile

      public boolean writeFile()
    • isComment

      protected boolean isComment(String line)
    • getEntries

      public Vector getEntries()
      return a Vector with a list of PasswordFileEntries for this password file. The first element in the Vector is the Version number of this file
      Returns:
    • print

      public void print()
    • add

      public boolean add(String id, String user, String password)
    • replace

      public boolean replace(String id, String user, String password)
    • delete

      public boolean delete(String id)
    • findEntry

      public int findEntry(String identifier)
    • getVersion

      public String getVersion()
    • getEntry

      public PasswordFileEntry getEntry(String identifier)
    • main

      public static void main(String[] args)