KeyStoreFileProp

public class KeyStoreFileProp implements Serializable

This class represents the data structure for holding parameters for accessing a keystore file. Since the parameters will be serialized to the file system, some fields (particularly password will be scrambled.

Author:kcyee

Fields

password

protected char[] password

Internal storage for the keystore password

type

protected String type

Internal storage for the keystore type

Constructors

KeyStoreFileProp

public KeyStoreFileProp(String type, char[] password)

Constructor that initializes the object with keystore parameters

Parameters:
  • type – the keystore type
  • password – the keystore password

Methods

decrypt

protected char[] decrypt(char[] password)

Decrypts the password. This is a helper function called internally to unscramble the password from storage.

Parameters:
  • password – the text to be decrypted
Returns:

the decrypted password

encrypt

protected char[] encrypt(char[] password)

Encrypts the password. This is a helper function called internally to scramble the password for storage.

Parameters:
  • password – the password to be encrypted
Returns:

the encrypted text

getPassword

public char[] getPassword()

Gets the keystore password

Returns:the keystore password

getType

public String getType()

Gets the keystore type

Returns:the keystore type