package(default_visibility = ["//visibility:public"])
-config_setting(
- name = "jdk9",
- values = {
- "java_toolchain": "@bazel_tools//tools/jdk:toolchain_jdk9",
- },
-)
-
genrule(
name = "all",
testonly = 1,
java_library(
name = "jgit",
srcs = SRCS,
- javacopts = select({
- "//:jdk9": ["--add-modules=java.xml.bind"],
- "//conditions:default": [],
- }),
resource_strip_prefix = "org.eclipse.jgit/resources",
resources = RESOURCES,
deps = [
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import javax.crypto.spec.SecretKeySpec;
-import javax.xml.bind.DatatypeConverter;
+import org.bouncycastle.util.encoders.Hex;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.util.Base64;
String DEFAULT_KEY_ALGO = JetS3tV2.ALGORITHM;
String DEFAULT_KEY_SIZE = Integer.toString(JetS3tV2.KEY_SIZE);
String DEFAULT_KEY_ITER = Integer.toString(JetS3tV2.ITERATIONS);
- String DEFAULT_KEY_SALT = DatatypeConverter.printHexBinary(JetS3tV2.SALT);
+ String DEFAULT_KEY_SALT = Hex.toHexString(JetS3tV2.SALT);
String EMPTY = ""; //$NON-NLS-1$
final byte[] salt;
try {
- salt = DatatypeConverter
- .parseHexBinary(keySalt.replaceAll(REGEX_WS, EMPTY));
+ salt = Hex.decode(keySalt.replaceAll(REGEX_WS, EMPTY));
} catch (Exception e) {
throw securityError(X_KEY_SALT + EMPTY + keySalt);
}