Skip to content
Reference > Classes

Password

Definition

Password var = .... ;

Extends

Extended By

None

Description

A data holder for a password

Method Summary

Owner Name Return Type Description
Password constructor(password) Password Creates a new password holder, note empty string is not a recommended password
Password clear() Object Clears the password from the Password holder, its the developer's responsibility to clear out the password after it is not needed. When cleared the password is set to empty string
Object getClassName() String Returns the string name of this object's class type.
Password peekAndClear() String Warning, this is intended to be used for debugging. Peek into the password holder and returns the password. This will clear out the password holder. Logs a security warning when this method is called.
Object toJson() String Returns a json representation of this object.

Method Definitions


constructor(password)

Password password = new Password(Object password)

Description

Creates a new password holder, note empty string is not a recommended password

Parameter Definition

Name Type Description
password Object  password string

clear()

Object Password::clear()

Description

Clears the password from the Password holder, its the developer's responsibility to clear out the password after it is not needed. When cleared the password is set to empty string


peekAndClear()

String Password::peekAndClear()

Description

Warning, this is intended to be used for debugging. Peek into the password holder and returns the password. This will clear out the password holder. Logs a security warning when this method is called.