mirror of
https://github.com/fluencelabs/crypto
synced 2025-07-06 16:11:43 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
e9b1e2d905 | |||
fcf7e08813 |
@ -1,5 +1,4 @@
|
|||||||
[](https://travis-ci.org/fluencelabs/crypto)
|
[](https://travis-ci.org/fluencelabs/crypto)
|
||||||
[](https://gitter.im/fluencelabs/crypto?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
|
||||||
|
|
||||||
# Сrypto
|
# Сrypto
|
||||||
|
|
||||||
@ -45,7 +44,7 @@ Simplified JWT implementation, meaning a JSON-serialized header and claim with s
|
|||||||
// Bintray repo is used so far. Migration to Maven Central is planned
|
// Bintray repo is used so far. Migration to Maven Central is planned
|
||||||
resolvers += Resolver.bintrayRepo("fluencelabs", "releases")
|
resolvers += Resolver.bintrayRepo("fluencelabs", "releases")
|
||||||
|
|
||||||
val cryptoV = "0.0.1"
|
val cryptoV = "0.0.3"
|
||||||
|
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"one.fluence" %%% "crypto-core" % cryptoV, // basic types and APIs
|
"one.fluence" %%% "crypto-core" % cryptoV, // basic types and APIs
|
||||||
|
14
build.sbt
14
build.sbt
@ -1,6 +1,6 @@
|
|||||||
import de.heikoseeberger.sbtheader.License
|
import de.heikoseeberger.sbtheader.License
|
||||||
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
|
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
|
||||||
import sbtcrossproject.crossProject
|
import sbtcrossproject.CrossPlugin.autoImport.crossProject
|
||||||
|
|
||||||
name := "crypto"
|
name := "crypto"
|
||||||
|
|
||||||
@ -10,11 +10,11 @@ javaOptions in Test ++= Seq("-ea")
|
|||||||
|
|
||||||
skip in publish := true // Skip root project
|
skip in publish := true // Skip root project
|
||||||
|
|
||||||
val scalaV = scalaVersion := "2.12.5"
|
val scalaV = scalaVersion := "2.12.8"
|
||||||
|
|
||||||
val commons = Seq(
|
val commons = Seq(
|
||||||
scalaV,
|
scalaV,
|
||||||
version := "0.0.2",
|
version := "0.0.4",
|
||||||
fork in Test := true,
|
fork in Test := true,
|
||||||
parallelExecution in Test := false,
|
parallelExecution in Test := false,
|
||||||
organization := "one.fluence",
|
organization := "one.fluence",
|
||||||
@ -31,15 +31,15 @@ val commons = Seq(
|
|||||||
|
|
||||||
commons
|
commons
|
||||||
|
|
||||||
val CodecV = "0.0.3"
|
val CodecV = "0.0.5"
|
||||||
|
|
||||||
val CatsEffectV = "1.0.0-RC3"
|
val CatsEffectV = "1.2.0"
|
||||||
|
|
||||||
val SloggingV = "0.6.1"
|
val SloggingV = "0.6.1"
|
||||||
|
|
||||||
val ScalatestV = "3.0.+"
|
val ScalatestV = "3.0.+"
|
||||||
|
|
||||||
val bouncyCastle = "org.bouncycastle" % "bcprov-jdk15on" % "1.59"
|
val bouncyCastle = "org.bouncycastle" % "bcprov-jdk15on" % "1.61"
|
||||||
|
|
||||||
enablePlugins(AutomateHeaderPlugin)
|
enablePlugins(AutomateHeaderPlugin)
|
||||||
|
|
||||||
@ -93,7 +93,6 @@ lazy val `crypto-hashsign` = crossProject(JVMPlatform, JSPlatform)
|
|||||||
.settings(
|
.settings(
|
||||||
commons,
|
commons,
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"biz.enef" %%% "slogging" % SloggingV,
|
|
||||||
"org.scalatest" %%% "scalatest" % ScalatestV % Test
|
"org.scalatest" %%% "scalatest" % ScalatestV % Test
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -126,6 +125,7 @@ lazy val `crypto-cipher` = crossProject(JVMPlatform, JSPlatform)
|
|||||||
.settings(
|
.settings(
|
||||||
commons,
|
commons,
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
|
"biz.enef" %%% "slogging" % SloggingV,
|
||||||
"org.scalatest" %%% "scalatest" % ScalatestV % Test
|
"org.scalatest" %%% "scalatest" % ScalatestV % Test
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -88,7 +88,7 @@ object CryptoJwt {
|
|||||||
|
|
||||||
private val alphabet = Bases.Alphabets.Base64Url
|
private val alphabet = Bases.Alphabets.Base64Url
|
||||||
|
|
||||||
private val strVec = BitsCodecs.base64AlphabetToVector(alphabet).swap
|
private val strVec = BitsCodecs.Base64.alphabetToVector(alphabet).swap
|
||||||
|
|
||||||
val signatureCodec: PureCodec[Signature, String] =
|
val signatureCodec: PureCodec[Signature, String] =
|
||||||
PureCodec.liftB[Signature, ByteVector](_.sign, Signature(_)) andThen strVec
|
PureCodec.liftB[Signature, ByteVector](_.sign, Signature(_)) andThen strVec
|
||||||
|
@ -69,7 +69,7 @@ object KeyStore {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// ByteVector to/from String, with the chosen alphabet
|
// ByteVector to/from String, with the chosen alphabet
|
||||||
private val vecToStr = BitsCodecs.base64AlphabetToVector(alphabet).swap
|
private val vecToStr = BitsCodecs.Base64.alphabetToVector(alphabet).swap
|
||||||
|
|
||||||
implicit val keyPairJsonCodec: PureCodec[KeyPair, Json] =
|
implicit val keyPairJsonCodec: PureCodec[KeyPair, Json] =
|
||||||
PureCodec.liftB[KeyPair, (ByteVector, ByteVector)](
|
PureCodec.liftB[KeyPair, (ByteVector, ByteVector)](
|
||||||
|
@ -1 +1 @@
|
|||||||
sbt.version = 1.2.1
|
sbt.version = 1.2.8
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.4.0")
|
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.0")
|
||||||
|
|
||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.2")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.20")
|
||||||
|
|
||||||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "4.1.0")
|
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.2.0")
|
||||||
|
|
||||||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22")
|
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.27")
|
||||||
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "0.3.1")
|
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "0.6.0")
|
||||||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.3.1")
|
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
|
||||||
|
|
||||||
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.10.0")
|
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.14.0")
|
||||||
|
|
||||||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.0")
|
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2")
|
||||||
|
|
||||||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")
|
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")
|
||||||
|
Reference in New Issue
Block a user