Skip to content

Commit e9adcb6

Browse files
committed
chore: testing
1 parent 7da2408 commit e9adcb6

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

lib/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ plugins {
1515

1616
dependencies {
1717
implementation(libs.bouncycastle.bcpg)
18-
implementation(project(":tools:teavm-plugin"))
18+
// implementation(project(":tools:teavm-plugin"))
1919
teavm(teavm.libs.jsoApis)
2020
}
2121

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
package com.github.renovatebot;
22

3+
import java.io.ByteArrayInputStream;
4+
import java.io.IOException;
35
import java.nio.charset.StandardCharsets;
46

7+
import org.bouncycastle.bcpg.ArmoredInputStream;
8+
import org.bouncycastle.openpgp.PGPException;
59
import org.teavm.jso.JSExport;
610

711
public final class Main {
@@ -11,9 +15,13 @@ private Main() {
1115
}
1216

1317
@JSExport
14-
public static String decrypt(String key, String msg) {
15-
final var bytes = "test".getBytes(StandardCharsets.US_ASCII);
18+
public static String decrypt(String key, String msg) throws IOException, PGPException {
19+
final var builder = ArmoredInputStream.builder().setIgnoreCRC(true);
20+
final var bytes = msg.getBytes(StandardCharsets.UTF_8);
21+
final var input = builder.build(new ByteArrayInputStream(bytes));
1622

17-
return "test" + bytes.length;
23+
input.close();
24+
25+
return "test -> " + bytes.length;
1826
}
1927
}

0 commit comments

Comments
 (0)