Skip to content

Commit 7f8e964

Browse files
committed
Cleanup
1 parent b8b19b1 commit 7f8e964

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/test/java/com/mycompany/fusionauth/plugins/ExamplePBDKF2HMACSHA1PasswordEncryptorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.mycompany.fusionauth.plugins;
22

3+
import io.fusionauth.plugin.spi.security.PasswordEncryptor;
34
import org.testng.annotations.DataProvider;
45
import org.testng.annotations.Test;
56
import static org.testng.Assert.assertEquals;
@@ -10,7 +11,7 @@
1011
public class ExamplePBDKF2HMACSHA1PasswordEncryptorTest {
1112
@Test(dataProvider = "hashes")
1213
public void encrypt(String password, String salt, String hash) {
13-
ExamplePBDKF2HMACSHA1PasswordEncryptor encryptor = new ExamplePBDKF2HMACSHA1PasswordEncryptor();
14+
PasswordEncryptor encryptor = new ExamplePBDKF2HMACSHA1PasswordEncryptor();
1415
assertEquals(encryptor.encrypt(password, salt, 10_000), hash);
1516
}
1617

src/test/java/com/mycompany/fusionauth/plugins/ExamplePBDKF2HMACSHA256Keylength512PasswordHasherTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.mycompany.fusionauth.plugins;
22

3+
import io.fusionauth.plugin.spi.security.PasswordEncryptor;
34
import org.testng.annotations.DataProvider;
45
import org.testng.annotations.Test;
56
import static org.testng.Assert.assertEquals;
@@ -10,7 +11,7 @@
1011
public class ExamplePBDKF2HMACSHA256Keylength512PasswordHasherTest {
1112
@Test(dataProvider = "hashes")
1213
public void encrypt(String password, String salt, String hash) {
13-
ExamplePBDKF2HMACSHA256KeyLength512PasswordHasher encryptor = new ExamplePBDKF2HMACSHA256KeyLength512PasswordHasher();
14+
PasswordEncryptor encryptor = new ExamplePBDKF2HMACSHA256KeyLength512PasswordHasher();
1415
assertEquals(encryptor.encrypt(password, salt, 27500), hash);
1516
}
1617

src/test/java/com/mycompany/fusionauth/plugins/ExampleRfc2898DeriveBytesPasswordEncryptorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.util.Base64;
44

5+
import io.fusionauth.plugin.spi.security.PasswordEncryptor;
56
import org.testng.annotations.DataProvider;
67
import org.testng.annotations.Test;
78
import static org.testng.Assert.assertEquals;
@@ -25,7 +26,7 @@ public void encrypt(String password, String hash) {
2526
String encodedSalt = Base64.getEncoder().encodeToString(salt);
2627
String encodedHash = Base64.getEncoder().encodeToString(subKey);
2728

28-
ExampleRfc2898DeriveBytesPasswordEncryptor encryptor = new ExampleRfc2898DeriveBytesPasswordEncryptor();
29+
PasswordEncryptor encryptor = new ExampleRfc2898DeriveBytesPasswordEncryptor();
2930
assertEquals(encryptor.encrypt(password, encodedSalt, 1_000), encodedHash);
3031
}
3132

0 commit comments

Comments
 (0)