From 38608df192c4032cb8d02c562ea56beae9d6ed7a Mon Sep 17 00:00:00 2001 From: Dmitry Kurinskiy Date: Thu, 13 Jun 2019 15:28:05 +0300 Subject: [PATCH] Slogging dependency is kept only in keystore (#7) --- build.sbt | 6 +++--- cipher/js/src/main/scala/fluence/crypto/aes/AesCrypt.scala | 2 +- cipher/jvm/src/main/scala/fluence/crypto/aes/AesCrypt.scala | 2 +- hashsign/js/src/test/scala/fluence/crypto/EcdsaSpec.scala | 1 - .../scala/fluence/crypto/{ecdsa => eddsa}/Ed25519.scala | 2 +- .../jvm/src/test/scala/fluence/crypto/Ed25519Spec.scala | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) rename hashsign/jvm/src/main/scala/fluence/crypto/{ecdsa => eddsa}/Ed25519.scala (99%) diff --git a/build.sbt b/build.sbt index 19547c0..3e4b2af 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ val scalaV = scalaVersion := "2.12.8" val commons = Seq( scalaV, - version := "0.0.5", + version := "0.0.6", fork in Test := true, parallelExecution in Test := false, organization := "one.fluence", @@ -104,7 +104,7 @@ lazy val `crypto-hashsign` = crossProject(JVMPlatform, JSPlatform) ) .jsSettings( npmDependencies in Compile ++= Seq( - "elliptic" -> "6.4.0" + "elliptic" -> "6.4.1" ), scalaJSModuleKind in Test := ModuleKind.CommonJSModule, //all JavaScript dependencies will be concatenated to a single file *-jsdeps.js @@ -125,7 +125,7 @@ lazy val `crypto-cipher` = crossProject(JVMPlatform, JSPlatform) .settings( commons, libraryDependencies ++= Seq( - "biz.enef" %%% "slogging" % SloggingV, + "biz.enef" %%% "slogging" % SloggingV % Test, "org.scalatest" %%% "scalatest" % ScalatestV % Test ) ) diff --git a/cipher/js/src/main/scala/fluence/crypto/aes/AesCrypt.scala b/cipher/js/src/main/scala/fluence/crypto/aes/AesCrypt.scala index 592db61..e7f4ee2 100644 --- a/cipher/js/src/main/scala/fluence/crypto/aes/AesCrypt.scala +++ b/cipher/js/src/main/scala/fluence/crypto/aes/AesCrypt.scala @@ -127,7 +127,7 @@ class AesCrypt(password: Array[Char], withIV: Boolean, config: AesConfig) { } } -object AesCrypt extends slogging.LazyLogging { +object AesCrypt { def build(password: ByteVector, withIV: Boolean, config: AesConfig): Crypto.Cipher[Array[Byte]] = { val aes = new AesCrypt(password.toHex.toCharArray, withIV, config) diff --git a/cipher/jvm/src/main/scala/fluence/crypto/aes/AesCrypt.scala b/cipher/jvm/src/main/scala/fluence/crypto/aes/AesCrypt.scala index 8840fc3..4471f1b 100644 --- a/cipher/jvm/src/main/scala/fluence/crypto/aes/AesCrypt.scala +++ b/cipher/jvm/src/main/scala/fluence/crypto/aes/AesCrypt.scala @@ -220,7 +220,7 @@ class AesCrypt(password: Array[Char], withIV: Boolean, config: AesConfig) extend } } -object AesCrypt extends slogging.LazyLogging { +object AesCrypt { def build(password: ByteVector, withIV: Boolean, config: AesConfig): Crypto.Cipher[Array[Byte]] = { val aes = new AesCrypt(password.toHex.toCharArray, withIV, config) diff --git a/hashsign/js/src/test/scala/fluence/crypto/EcdsaSpec.scala b/hashsign/js/src/test/scala/fluence/crypto/EcdsaSpec.scala index ee61f60..8ddffae 100644 --- a/hashsign/js/src/test/scala/fluence/crypto/EcdsaSpec.scala +++ b/hashsign/js/src/test/scala/fluence/crypto/EcdsaSpec.scala @@ -21,7 +21,6 @@ import cats.data.EitherT import cats.instances.try_._ import fluence.crypto.ecdsa.Ecdsa import fluence.crypto.signature.Signature -import fluence.crypto.{CryptoError, KeyPair} import org.scalatest.{Matchers, WordSpec} import scodec.bits.ByteVector diff --git a/hashsign/jvm/src/main/scala/fluence/crypto/ecdsa/Ed25519.scala b/hashsign/jvm/src/main/scala/fluence/crypto/eddsa/Ed25519.scala similarity index 99% rename from hashsign/jvm/src/main/scala/fluence/crypto/ecdsa/Ed25519.scala rename to hashsign/jvm/src/main/scala/fluence/crypto/eddsa/Ed25519.scala index 455f560..55cda42 100644 --- a/hashsign/jvm/src/main/scala/fluence/crypto/ecdsa/Ed25519.scala +++ b/hashsign/jvm/src/main/scala/fluence/crypto/eddsa/Ed25519.scala @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package fluence.crypto.ecdsa +package fluence.crypto.eddsa import java.security._ diff --git a/hashsign/jvm/src/test/scala/fluence/crypto/Ed25519Spec.scala b/hashsign/jvm/src/test/scala/fluence/crypto/Ed25519Spec.scala index 0c80d42..e862302 100644 --- a/hashsign/jvm/src/test/scala/fluence/crypto/Ed25519Spec.scala +++ b/hashsign/jvm/src/test/scala/fluence/crypto/Ed25519Spec.scala @@ -21,7 +21,7 @@ import java.io.File import cats.data.EitherT import cats.instances.try_._ -import fluence.crypto.ecdsa.Ed25519 +import fluence.crypto.eddsa.Ed25519 import fluence.crypto.keystore.FileKeyStorage import fluence.crypto.signature.Signature import org.scalatest.{Matchers, WordSpec}