Skip to content

Commit a38c09f

Browse files
committed
Java 5 compatibility
1 parent 81da673 commit a38c09f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pg/src/test/java/org/bouncycastle/openpgp/test/PGPUnicodeTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.bouncycastle.openpgp.operator.jcajce.JcaPGPDigestCalculatorProviderBuilder;
2424
import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder;
2525
import org.bouncycastle.test.PrintTestResult;
26+
import org.bouncycastle.util.encoders.Hex;
2627

2728
public class PGPUnicodeTest
2829
extends TestCase
@@ -75,7 +76,7 @@ public void test_UmlautPassphrase()
7576
{
7677
BigInteger keyId = new BigInteger("362961283C48132B9F14C5C3EC87272EFCB986D2", 16);
7778

78-
String passphrase = new String("H\u00e4ndle".getBytes(Charset.forName("UTF-16")), Charset.forName("UTF-16"));
79+
String passphrase = "H\u00e4ndle";
7980
// FileInputStream passwordFile = new FileInputStream("testdata/passphrase_for_test.txt");
8081
// byte[] password = new byte[passwordFile.available()];
8182
// passwordFile.read(password);

0 commit comments

Comments
 (0)