mirror of
https://github.com/enso-org/enso.git
synced 2024-11-26 08:52:58 +03:00
Remove org.bouncycastle dependency (#8664)
Remove `org.bouncycastle` dependency from `org.enso.runtime`.
This commit is contained in:
parent
bbf71ec4f1
commit
428e83de36
22
build.sbt
22
build.sbt
@ -551,10 +551,9 @@ lazy val `text-buffer` = project
|
|||||||
.settings(
|
.settings(
|
||||||
frgaalJavaCompilerSetting,
|
frgaalJavaCompilerSetting,
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"org.typelevel" %% "cats-core" % catsVersion,
|
"org.typelevel" %% "cats-core" % catsVersion,
|
||||||
"org.bouncycastle" % "bcpkix-jdk15on" % bcpkixJdk15Version,
|
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
|
||||||
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
|
"org.scalacheck" %% "scalacheck" % scalacheckVersion % Test
|
||||||
"org.scalacheck" %% "scalacheck" % scalacheckVersion % Test
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1296,13 +1295,9 @@ lazy val `language-server` = (project in file("engine/language-server"))
|
|||||||
),
|
),
|
||||||
Test / modulePath := {
|
Test / modulePath := {
|
||||||
val updateReport = (Test / update).value
|
val updateReport = (Test / update).value
|
||||||
// org.bouncycastle is a module required by `org.enso.runtime` module.
|
|
||||||
val requiredModIds =
|
val requiredModIds =
|
||||||
GraalVM.modules ++ GraalVM.langsPkgs ++ logbackPkg ++ Seq(
|
GraalVM.modules ++ GraalVM.langsPkgs ++ logbackPkg ++ Seq(
|
||||||
"org.slf4j" % "slf4j-api" % slf4jVersion,
|
"org.slf4j" % "slf4j-api" % slf4jVersion
|
||||||
"org.bouncycastle" % "bcutil-jdk18on" % "1.76",
|
|
||||||
"org.bouncycastle" % "bcpkix-jdk18on" % "1.76",
|
|
||||||
"org.bouncycastle" % "bcprov-jdk18on" % "1.76"
|
|
||||||
)
|
)
|
||||||
val requiredMods = JPMSUtils.filterModulesFromUpdate(
|
val requiredMods = JPMSUtils.filterModulesFromUpdate(
|
||||||
updateReport,
|
updateReport,
|
||||||
@ -1976,14 +1971,7 @@ lazy val `runtime-fat-jar` =
|
|||||||
assembly / test := {},
|
assembly / test := {},
|
||||||
assembly / assemblyOutputPath := file("runtime.jar"),
|
assembly / assemblyOutputPath := file("runtime.jar"),
|
||||||
assembly / assemblyExcludedJars := {
|
assembly / assemblyExcludedJars := {
|
||||||
// bouncycastle jdk5 needs to be excluded from the Uber jar, as otherwise its packages would
|
val pkgsToExclude = JPMSUtils.componentModules
|
||||||
// clash with packages in org.bouncycastle.jdk18 modules
|
|
||||||
val bouncyCastleJdk5 = Seq(
|
|
||||||
"org.bouncycastle" % "bcutil-jdk15on" % bcpkixJdk15Version,
|
|
||||||
"org.bouncycastle" % "bcpkix-jdk15on" % bcpkixJdk15Version,
|
|
||||||
"org.bouncycastle" % "bcprov-jdk15on" % bcpkixJdk15Version
|
|
||||||
)
|
|
||||||
val pkgsToExclude = JPMSUtils.componentModules ++ bouncyCastleJdk5
|
|
||||||
val ourFullCp = (Runtime / fullClasspath).value
|
val ourFullCp = (Runtime / fullClasspath).value
|
||||||
JPMSUtils.filterModulesFromClasspath(
|
JPMSUtils.filterModulesFromClasspath(
|
||||||
ourFullCp,
|
ourFullCp,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Enso
|
Enso
|
||||||
Copyright 2020 - 2023 New Byte Order sp. z o. o.
|
Copyright 2020 - 2024 New Byte Order sp. z o. o.
|
||||||
|
|
||||||
'enumeratum-circe_2.13', licensed under the MIT, is distributed with the engine.
|
'enumeratum-circe_2.13', licensed under the MIT, is distributed with the engine.
|
||||||
The license information can be found along with the copyright notices.
|
The license information can be found along with the copyright notices.
|
||||||
@ -286,31 +286,16 @@ The license file can be found at `licenses/APACHE2.0`.
|
|||||||
Copyright notices related to this dependency can be found in the directory `org.apache.tika.tika-core-2.4.1`.
|
Copyright notices related to this dependency can be found in the directory `org.apache.tika.tika-core-2.4.1`.
|
||||||
|
|
||||||
|
|
||||||
'bcpkix-jdk15on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcpkix-jdk15on-1.70`.
|
|
||||||
|
|
||||||
|
|
||||||
'bcpkix-jdk18on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
'bcpkix-jdk18on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcpkix-jdk18on-1.76`.
|
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcpkix-jdk18on-1.76`.
|
||||||
|
|
||||||
|
|
||||||
'bcprov-jdk15on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcprov-jdk15on-1.70`.
|
|
||||||
|
|
||||||
|
|
||||||
'bcprov-jdk18on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
'bcprov-jdk18on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcprov-jdk18on-1.76`.
|
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcprov-jdk18on-1.76`.
|
||||||
|
|
||||||
|
|
||||||
'bcutil-jdk15on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcutil-jdk15on-1.70`.
|
|
||||||
|
|
||||||
|
|
||||||
'bcutil-jdk18on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
'bcutil-jdk18on', licensed under the Bouncy Castle Licence, is distributed with the engine.
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcutil-jdk18on-1.76`.
|
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcutil-jdk18on-1.76`.
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
/* Partially optimised Serpent S Box boolean functions derived */
|
|
||||||
/* using a recursive descent analyser but without a full search */
|
|
||||||
/* of all subtrees. This set of S boxes is the result of work */
|
|
||||||
/* by Sam Simpson and Brian Gladman using the spare time on a */
|
|
||||||
/* cluster of high capacity servers to search for S boxes with */
|
|
||||||
/* this customised search engine. There are now an average of */
|
|
||||||
/* 15.375 terms per S box. */
|
|
||||||
/* */
|
|
||||||
/* Copyright: Dr B. R Gladman (gladman@seven77.demon.co.uk) */
|
|
||||||
/* and Sam Simpson (s.simpson@mia.co.uk) */
|
|
||||||
/* 17th December 1998 */
|
|
||||||
/* */
|
|
||||||
/* We hereby give permission for information in this file to be */
|
|
||||||
/* used freely subject only to acknowledgement of its origin. */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Bouncy Castle License
|
|
||||||
*
|
|
||||||
* Copyright (c) 2000-2021 The Legion Of The Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
||||||
* <p>
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
||||||
* and associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
||||||
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
* subject to the following conditions:
|
|
||||||
* <p>
|
|
||||||
* The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
||||||
* portions of the Software.
|
|
||||||
* <p>
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
||||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
||||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
* DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
@ -1,2 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
Enso
|
Enso
|
||||||
Copyright 2020 - 2023 New Byte Order sp. z o. o.
|
Copyright 2020 - 2024 New Byte Order sp. z o. o.
|
||||||
|
|
||||||
'redshift-jdbc42', licensed under the Apache License, Version 2.0, is distributed with the AWS.
|
'redshift-jdbc42', licensed under the Apache License, Version 2.0, is distributed with the AWS.
|
||||||
The license information can be found along with the copyright notices.
|
The license information can be found along with the copyright notices.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Enso
|
Enso
|
||||||
Copyright 2020 - 2023 New Byte Order sp. z o. o.
|
Copyright 2020 - 2024 New Byte Order sp. z o. o.
|
||||||
|
|
||||||
'icu4j', licensed under the Unicode/ICU License, is distributed with the Base.
|
'icu4j', licensed under the Unicode/ICU License, is distributed with the Base.
|
||||||
The license information can be found along with the copyright notices.
|
The license information can be found along with the copyright notices.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Enso
|
Enso
|
||||||
Copyright 2020 - 2023 New Byte Order sp. z o. o.
|
Copyright 2020 - 2024 New Byte Order sp. z o. o.
|
||||||
|
|
||||||
'checker-qual', licensed under the The MIT License, is distributed with the Database.
|
'checker-qual', licensed under the The MIT License, is distributed with the Database.
|
||||||
The license information can be found along with the copyright notices.
|
The license information can be found along with the copyright notices.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Enso
|
Enso
|
||||||
Copyright 2020 - 2023 New Byte Order sp. z o. o.
|
Copyright 2020 - 2024 New Byte Order sp. z o. o.
|
||||||
|
|
||||||
'google-api-client', licensed under the The Apache Software License, Version 2.0, is distributed with the Google_Api.
|
'google-api-client', licensed under the The Apache Software License, Version 2.0, is distributed with the Google_Api.
|
||||||
The license file can be found at `licenses/APACHE2.0`.
|
The license file can be found at `licenses/APACHE2.0`.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Enso
|
Enso
|
||||||
Copyright 2020 - 2023 New Byte Order sp. z o. o.
|
Copyright 2020 - 2024 New Byte Order sp. z o. o.
|
||||||
|
|
||||||
'opencv', licensed under the BSD License, is distributed with the Image.
|
'opencv', licensed under the BSD License, is distributed with the Image.
|
||||||
The license file can be found at `licenses/BSD-3-Clause`.
|
The license file can be found at `licenses/BSD-3-Clause`.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Enso
|
Enso
|
||||||
Copyright 2020 - 2023 New Byte Order sp. z o. o.
|
Copyright 2020 - 2024 New Byte Order sp. z o. o.
|
||||||
|
|
||||||
'curvesapi', licensed under the BSD License, is distributed with the Table.
|
'curvesapi', licensed under the BSD License, is distributed with the Table.
|
||||||
The license file can be found at `licenses/BSD-3-Clause`.
|
The license file can be found at `licenses/BSD-3-Clause`.
|
||||||
|
@ -246,21 +246,6 @@ The license information can be found along with the copyright notices.
|
|||||||
Copyright notices related to this dependency can be found in the directory `org.apache.commons.commons-lang3-3.12.0`.
|
Copyright notices related to this dependency can be found in the directory `org.apache.commons.commons-lang3-3.12.0`.
|
||||||
|
|
||||||
|
|
||||||
'bcpkix-jdk15on', licensed under the Bouncy Castle Licence, is distributed with the project-manager.
|
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcpkix-jdk15on-1.70`.
|
|
||||||
|
|
||||||
|
|
||||||
'bcprov-jdk15on', licensed under the Bouncy Castle Licence, is distributed with the project-manager.
|
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcprov-jdk15on-1.70`.
|
|
||||||
|
|
||||||
|
|
||||||
'bcutil-jdk15on', licensed under the Bouncy Castle Licence, is distributed with the project-manager.
|
|
||||||
The license file can be found at `licenses/Bouncy_Castle_Licence.txt`.
|
|
||||||
Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcutil-jdk15on-1.70`.
|
|
||||||
|
|
||||||
|
|
||||||
'polyglot', licensed under the Universal Permissive License, Version 1.0, is distributed with the project-manager.
|
'polyglot', licensed under the Universal Permissive License, Version 1.0, is distributed with the project-manager.
|
||||||
The license file can be found at `licenses/Universal_Permissive_License__Version_1.0`.
|
The license file can be found at `licenses/Universal_Permissive_License__Version_1.0`.
|
||||||
Copyright notices related to this dependency can be found in the directory `org.graalvm.polyglot.polyglot-23.1.0`.
|
Copyright notices related to this dependency can be found in the directory `org.graalvm.polyglot.polyglot-23.1.0`.
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,2 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
/* Partially optimised Serpent S Box boolean functions derived */
|
|
||||||
/* using a recursive descent analyser but without a full search */
|
|
||||||
/* of all subtrees. This set of S boxes is the result of work */
|
|
||||||
/* by Sam Simpson and Brian Gladman using the spare time on a */
|
|
||||||
/* cluster of high capacity servers to search for S boxes with */
|
|
||||||
/* this customised search engine. There are now an average of */
|
|
||||||
/* 15.375 terms per S box. */
|
|
||||||
/* */
|
|
||||||
/* Copyright: Dr B. R Gladman (gladman@seven77.demon.co.uk) */
|
|
||||||
/* and Sam Simpson (s.simpson@mia.co.uk) */
|
|
||||||
/* 17th December 1998 */
|
|
||||||
/* */
|
|
||||||
/* We hereby give permission for information in this file to be */
|
|
||||||
/* used freely subject only to acknowledgement of its origin. */
|
|
||||||
|
|
||||||
Copyright (c) 2000-2021 The Legion Of The Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
@ -1,2 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
||||||
|
|
@ -4,12 +4,12 @@ import akka.actor.{Actor, Props}
|
|||||||
import akka.pattern.pipe
|
import akka.pattern.pipe
|
||||||
import akka.routing.SmallestMailboxPool
|
import akka.routing.SmallestMailboxPool
|
||||||
import com.typesafe.scalalogging.LazyLogging
|
import com.typesafe.scalalogging.LazyLogging
|
||||||
import org.bouncycastle.util.encoders.Hex
|
|
||||||
import org.enso.languageserver.data.FileManagerConfig
|
import org.enso.languageserver.data.FileManagerConfig
|
||||||
import org.enso.languageserver.effect._
|
import org.enso.languageserver.effect._
|
||||||
import org.enso.languageserver.filemanager.FileManagerProtocol.TextualFileContent
|
import org.enso.languageserver.filemanager.FileManagerProtocol.TextualFileContent
|
||||||
import org.enso.languageserver.monitoring.MonitoringProtocol.{Ping, Pong}
|
import org.enso.languageserver.monitoring.MonitoringProtocol.{Ping, Pong}
|
||||||
import org.enso.languageserver.util.UnhandledLogging
|
import org.enso.languageserver.util.UnhandledLogging
|
||||||
|
import org.enso.text.Hex
|
||||||
import zio._
|
import zio._
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
@ -8,7 +8,6 @@ open module org.enso.runtime {
|
|||||||
requires org.graalvm.polyglot;
|
requires org.graalvm.polyglot;
|
||||||
requires org.graalvm.truffle;
|
requires org.graalvm.truffle;
|
||||||
requires static org.slf4j;
|
requires static org.slf4j;
|
||||||
requires org.bouncycastle.provider;
|
|
||||||
|
|
||||||
uses org.slf4j.spi.SLF4JServiceProvider;
|
uses org.slf4j.spi.SLF4JServiceProvider;
|
||||||
|
|
||||||
|
@ -10,15 +10,15 @@ import java.nio.file.NoSuchFileException;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.StandardOpenOption;
|
import java.nio.file.StandardOpenOption;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.bouncycastle.jcajce.provider.digest.SHA1;
|
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.logger.masking.MaskedPath;
|
import org.enso.logger.masking.MaskedPath;
|
||||||
import org.enso.pkg.SourceFile;
|
import org.enso.pkg.SourceFile;
|
||||||
|
import org.enso.text.Hex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache encapsulates a common functionality needed to serialize and de-serialize objects, while
|
* Cache encapsulates a common functionality needed to serialize and de-serialize objects, while
|
||||||
@ -393,7 +393,11 @@ public abstract class Cache<T, M extends Cache.Metadata> {
|
|||||||
* @return digest used for computing hashes
|
* @return digest used for computing hashes
|
||||||
*/
|
*/
|
||||||
protected MessageDigest messageDigest() {
|
protected MessageDigest messageDigest() {
|
||||||
return new SHA1.Digest();
|
try {
|
||||||
|
return MessageDigest.getInstance("SHA-1");
|
||||||
|
} catch (NoSuchAlgorithmException ex) {
|
||||||
|
throw new IllegalStateException("Unreachable", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
18
lib/scala/text-buffer/src/main/java/org/enso/text/Hex.java
Normal file
18
lib/scala/text-buffer/src/main/java/org/enso/text/Hex.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package org.enso.text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A utility class that serves as a replacement of some methods from {@code org.bouncycastle}, so
|
||||||
|
* that we don't have to depend on it.
|
||||||
|
*/
|
||||||
|
public final class Hex {
|
||||||
|
/** Converts the byte array to its hexadecimal String representation. */
|
||||||
|
public static String toHexString(byte[] bytes) {
|
||||||
|
char[] out = new char[bytes.length * 2];
|
||||||
|
for (int i = 0; i < bytes.length; i++) {
|
||||||
|
int v = bytes[i] & 0xFF;
|
||||||
|
out[i * 2] = Character.forDigit(v >>> 4, 16);
|
||||||
|
out[i * 2 + 1] = Character.forDigit(v & 0x0F, 16);
|
||||||
|
}
|
||||||
|
return new String(out);
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,5 @@
|
|||||||
package org.enso.text
|
package org.enso.text
|
||||||
|
|
||||||
import org.bouncycastle.util.encoders.Hex
|
|
||||||
|
|
||||||
/** Version of the text contents. */
|
/** Version of the text contents. */
|
||||||
case class ContentVersion(toHexString: String)
|
case class ContentVersion(toHexString: String)
|
||||||
|
|
||||||
|
@ -2,14 +2,14 @@ package org.enso.text
|
|||||||
|
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
|
|
||||||
import org.bouncycastle.jcajce.provider.digest.SHA3
|
import java.security.MessageDigest
|
||||||
|
|
||||||
/** SHA3-224 digest calculator. */
|
/** SHA3-224 digest calculator. */
|
||||||
object Sha3_224VersionCalculator extends ContentBasedVersioning {
|
object Sha3_224VersionCalculator extends ContentBasedVersioning {
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
override def evalVersion(content: CharSequence): ContentVersion = {
|
override def evalVersion(content: CharSequence): ContentVersion = {
|
||||||
val digestSHA3 = new SHA3.Digest224()
|
val digestSHA3 = MessageDigest.getInstance("SHA3-224")
|
||||||
val digest =
|
val digest =
|
||||||
digestSHA3.digest(content.toString.getBytes(StandardCharsets.UTF_8))
|
digestSHA3.digest(content.toString.getBytes(StandardCharsets.UTF_8))
|
||||||
ContentVersion(digest)
|
ContentVersion(digest)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
79F8085006CADBE1F915455506E1CDEB9A27B8B59EDFCA78FAA3218A3296DE62
|
79F8085006CADBE1F915455506E1CDEB9A27B8B59EDFCA78FAA3218A3296DE62
|
||||||
9881D29C00C41E935A59AE991CB1518925A0CB0DFCC612B09C6C2823F25047D9
|
6F5A08E5432F0B0C17A5CFC28207781B7C39E85B120D4F74B9B6AA35FF80E8C0
|
||||||
0
|
0
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
58F42EA238F4F16E775412B67F584C74188267FB305705B57A50E10124FE56BC
|
58F42EA238F4F16E775412B67F584C74188267FB305705B57A50E10124FE56BC
|
||||||
7C5FEB79459C03EB21D2098EFC33BF7AA26E3C51204A9F32F3DCFC854D5A36A0
|
DC3F2E51015236DC72560E5DD29B13156A2244C6753828B6D0848683018D5ABA
|
||||||
0
|
0
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
4DFA19B7C7AB8984E827C35E9CA6EF40CC3B246094BB0A763D65AD6BF76F0D26
|
4DFA19B7C7AB8984E827C35E9CA6EF40CC3B246094BB0A763D65AD6BF76F0D26
|
||||||
A9799420579F008532E370B2E2B7D3A811348AE47C8B408E238B741B68AC5224
|
DF30306CEDC69A2DB5BF394CDD77B240B6F6B2E695D4DE6BDC343EAA271CEB34
|
||||||
0
|
0
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
C5C845C319F900C420F04C815ACFC315E24C581960BE61B03BB6A2F8D71122C9
|
C5C845C319F900C420F04C815ACFC315E24C581960BE61B03BB6A2F8D71122C9
|
||||||
F5B860DA0130C53DB5E531A7FDBBFCB7BB54FCEA064A0C8B250EDB7530D6A611
|
12BB786E599BE5441F12C0061839D42DBA889C1FBC45F74938E71F664ABD0E65
|
||||||
0
|
0
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
F091B0AA1B0A0AE841293C582ED74A6D26913D9BB4E8C64DF1C8FC466E8418A8
|
F091B0AA1B0A0AE841293C582ED74A6D26913D9BB4E8C64DF1C8FC466E8418A8
|
||||||
6C4D25C4E9D8A12671E24EE1E60C49C63E8DBA26BE88480F0E12A9112DBF7C03
|
87C7DE197372E63C24D6AF3384EA2898F4ECD5486863DA8520660D597995BE28
|
||||||
0
|
0
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
AE474B24FC7C88ACA56C70EC19DCD5F224178089AA2910DB117EE7D914D6C7FF
|
AE474B24FC7C88ACA56C70EC19DCD5F224178089AA2910DB117EE7D914D6C7FF
|
||||||
A4E29BBEAAEE4B4A5593D949D658170B8591E0FADA2F469CDCBF640B307B74D4
|
45B9C528D26D13399A07F9FFE79576924709B1DEB991862372B4AFB185869893
|
||||||
0
|
0
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
@ -1,3 +0,0 @@
|
|||||||
+ "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE"
|
|
||||||
+ "The above copyright notice and this permission notice shall be included in all copies or substantial"
|
|
||||||
"Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) "
|
|
@ -1,2 +0,0 @@
|
|||||||
Copyright: Dr B. R Gladman (gladman@seven77.demon.co.uk) */
|
|
||||||
Copyright (c) 2000-2021 The Legion Of The Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
@ -1 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
@ -1,3 +1,3 @@
|
|||||||
C8A7F23E0F92119165D3B2ED47723018A69580A04331359C9BE435FD62F93E51
|
D8B011DD7E11E226FD042DCDEE28B22C5D74D2B7A666346317619CCB487832C4
|
||||||
F31394818AC1E81F6172B92D39A06004A7E24D211399E26DE0EE51F7FE10BFCD
|
0035ED295654FAACCD79D0DA6D2CDDA8E2EC8D0BA9254722FB55C6F622A68B94
|
||||||
0
|
0
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
@ -1,3 +0,0 @@
|
|||||||
+ "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE"
|
|
||||||
+ "The above copyright notice and this permission notice shall be included in all copies or substantial"
|
|
||||||
"Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) "
|
|
@ -1 +0,0 @@
|
|||||||
Copyright (c) 2000-2021 The Legion Of The Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
@ -1 +0,0 @@
|
|||||||
Copyright: Dr B. R Gladman (gladman@seven77.demon.co.uk) */
|
|
@ -1 +0,0 @@
|
|||||||
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
|
@ -1,3 +1,3 @@
|
|||||||
9D93C578E044AEEE4683119559D7D91A6C43C5BC4B811B81F76FBAB003CD960F
|
578C28B786B877E41559F52CBDFBF45DE798CEB12FDF9632A93CC4B1B30C72C6
|
||||||
23C9B84A5312F46DAD4EBFB7D0267E4111E16F97BDA00E8C1AEECA0DEBF81CE5
|
D1B18FEE4514908AD689F9B25D7E4445E5F3D75296F136BED478DB855D891F88
|
||||||
0
|
0
|
||||||
|
@ -1 +0,0 @@
|
|||||||
tools/legal-review/license-texts/Bouncy_Castle_Licence.txt
|
|
Loading…
Reference in New Issue
Block a user