mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add PBKDF2
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package cn.hutool.crypto.test.symmetric;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class PBKDF2Test {
|
||||
|
||||
@Test
|
||||
public void encryptTest(){
|
||||
final String s = SecureUtil.pbkdf2("123456".toCharArray(), RandomUtil.randomBytes(16));
|
||||
Assert.assertEquals(128, s.length());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user