]> WPIA git - gigi.git/blobdiff - tests/com/lambdaworks/crypto/test/SCryptUtilTest.java
Merge "Update notes about password security"
[gigi.git] / tests / com / lambdaworks / crypto / test / SCryptUtilTest.java
index f673657e653acaf0228106671d993f28f43b5ad7..cac9c436f47eb62460216d188371028387793181 100644 (file)
@@ -1,14 +1,18 @@
-// Copyright (C) 2011 - Will Glozer.  All rights reserved.
+// Copyright (C) 2011 - Will Glozer. All rights reserved.
 
 package com.lambdaworks.crypto.test;
 
-import com.lambdaworks.codec.Base64;
+import java.util.Base64;
+
 import com.lambdaworks.crypto.SCryptUtil;
+
 import org.junit.Assert;
 import org.junit.Test;
+
 import static org.junit.Assert.*;
 
 public class SCryptUtilTest {
+
     String passwd = "secret";
 
     @Test
@@ -22,8 +26,8 @@ public class SCryptUtilTest {
 
         assertEquals(5, parts.length);
         assertEquals("s0", parts[1]);
-        Assert.assertEquals(16, Base64.decode(parts[3].toCharArray()).length);
-        assertEquals(32, Base64.decode(parts[4].toCharArray()).length);
+        Assert.assertEquals(16, Base64.getDecoder().decode(parts[3]).length);
+        assertEquals(32, Base64.getDecoder().decode(parts[4]).length);
 
         int params = Integer.valueOf(parts[2], 16);