Home | History | Annotate | Download | only in spec

Lines Matching refs:salt

60      * PBEKeySpec(char[] password, byte[] salt, int iterationCount, int
67 byte[] salt = new byte[] {1, 2, 3, 4, 5};
72 PBEKeySpec pbeks = new PBEKeySpec(null, salt,
85 + "in the case of null salt.");
94 + "in the case of empty salt.");
99 new PBEKeySpec(password, salt, -1, keyLength);
106 new PBEKeySpec(password, salt, iterationCount, -1);
113 new PBEKeySpec(password, salt, 0, keyLength);
120 new PBEKeySpec(password, salt, iterationCount, 0);
126 PBEKeySpec pbeks = new PBEKeySpec(password, salt,
132 salt[0] ++;
133 assertFalse("The change of salt specified in the constructor "
135 salt[0] == pbeks.getSalt()[0]);
139 * PBEKeySpec(char[] password, byte[] salt, int iterationCount) method
146 byte[] salt = new byte[] {1, 2, 3, 4, 5};
150 PBEKeySpec pbeks = new PBEKeySpec(null, salt, iterationCount);
162 + "in the case of null salt.");
172 + "in the case of empty salt.");
177 new PBEKeySpec(password, salt, -1);
184 new PBEKeySpec(password, salt, 0);
190 PBEKeySpec pbeks = new PBEKeySpec(password, salt, iterationCount);
195 salt[0] ++;
196 assertFalse("The change of salt specified in the constructor "
198 salt[0] == pbeks.getSalt()[0]);
237 * getSalt() method testing. Tests that returned salt is equal
238 * to the salt specified in the constructor and that the change of
240 * Also it checks that the method returns null if salt is not
245 byte[] salt = new byte[] {1, 2, 3, 4, 5};
247 PBEKeySpec pbeks = new PBEKeySpec(password, salt, iterationCount);
249 if (! Arrays.equals(salt, result)) {
250 fail("The returned salt is not equal to the specified "
254 assertFalse("The change of returned by getSalt() method salt"
258 assertNull("The getSalt() method should return null if the salt "
270 byte[] salt = new byte[] {1, 2, 3, 4, 5};
272 PBEKeySpec pbeks = new PBEKeySpec(password, salt, iterationCount);
287 byte[] salt = new byte[] {1, 2, 3, 4, 5};
290 PBEKeySpec pbeks = new PBEKeySpec(password, salt,