Home | History | Annotate | Download | only in spec

Lines Matching refs:password

31  * A user-chosen password that can be used with password-based encryption
34 * <p>The password can be viewed as some kind of raw key material, from which
37 * <p>Different PBE mechanisms may consume different bits of each password
43 * <p>You convert the password characters to a PBE key by creating an
46 * of each password character, whereas a secret-key factory for PKCS #12 will
52 * internal value when the password stored in it is no longer needed. Hence,
53 * this class requests the password as a char array, so it can be overwritten
65 private char[] password;
71 * Constructor that takes a password. An empty char[] is used if
74 * <p> Note: <code>password</code> is cloned before it is stored in
77 * @param password the password.
79 public PBEKeySpec(char[] password) {
80 if ((password == null) || (password.length == 0)) {
81 this.password = new char[0];
83 this.password = password.clone();
89 * Constructor that takes a password, salt, iteration count, and
92 * <code>password</code>.
94 * <p> Note: the <code>password</code> and <code>salt</code>
98 * @param password the password.
107 public PBEKeySpec(char[] password, byte[] salt, int iterationCount,
109 if ((password == null) || (password.length == 0)) {
110 this.password = new char[0];
112 this.password = password.clone();
135 * Constructor that takes a password, salt, iteration count for
137 * char[] is used if null is specified for <code>password</code>.
139 * <p> Note: the <code>password</code> and <code>salt</code>
143 * @param password the password.
150 public PBEKeySpec(char[] password, byte[] salt, int iterationCount) {
151 if ((password == null) || (password.length == 0)) {
152 this.password = new char[0];
154 this.password = password.clone();
172 * Clears the internal copy of the password.
176 if (password != null) {
177 for (int i = 0; i < password.length; i++) {
178 password[i] = ' ';
180 password = null;
185 * Returns a copy of the password.
187 * <p> Note: this method returns a copy of the password. It is
188 * the caller's responsibility to zero out the password information after
191 * @exception IllegalStateException if password has been cleared by
193 * @return the password.
196 if (password == null) {
197 throw new IllegalStateException("password has been cleared");
199 return password.clone();