scala-crypto

Algorithm for scala and scala.js

License

License

MIT
Categories

Categories

Scala Languages
GroupId

GroupId

com.dedipresta
ArtifactId

ArtifactId

scala-crypto_sjs1_2.13
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

scala-crypto
Algorithm for scala and scala.js
Project URL

Project URL

https://github.com/dedipresta/scala-crypto
Project Organization

Project Organization

Dedipresta
Source Code Management

Source Code Management

https://github.com/dedipresta/scala-crypto

Download scala-crypto_sjs1_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/com.dedipresta/scala-crypto_sjs1_2.13/ -->
<dependency>
    <groupId>com.dedipresta</groupId>
    <artifactId>scala-crypto_sjs1_2.13</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.dedipresta/scala-crypto_sjs1_2.13/
implementation 'com.dedipresta:scala-crypto_sjs1_2.13:1.0.0'
// https://jarcasting.com/artifacts/com.dedipresta/scala-crypto_sjs1_2.13/
implementation ("com.dedipresta:scala-crypto_sjs1_2.13:1.0.0")
'com.dedipresta:scala-crypto_sjs1_2.13:jar:1.0.0'
<dependency org="com.dedipresta" name="scala-crypto_sjs1_2.13" rev="1.0.0">
  <artifact name="scala-crypto_sjs1_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.dedipresta', module='scala-crypto_sjs1_2.13', version='1.0.0')
)
libraryDependencies += "com.dedipresta" % "scala-crypto_sjs1_2.13" % "1.0.0"
[com.dedipresta/scala-crypto_sjs1_2.13 "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.3
org.scala-js : scalajs-library_2.13 jar 1.1.1

provided (1)

Group / Artifact Type Version
com.sksamuel.scapegoat : scalac-scapegoat-plugin_2.13.3 jar 1.4.5

test (4)

Group / Artifact Type Version
org.scala-js : scalajs-test-bridge_2.13 jar 1.1.1
org.scalatestplus : scalacheck-1-14_sjs1_2.13 jar 3.2.0.0
org.scalacheck : scalacheck_sjs1_2.13 jar 1.14.3
org.scalatest : scalatest_sjs1_2.13 jar 3.1.2

Project Modules

There are no modules declared in this project.

SCALA-CRYPTO

Scala 2.12 Scala 2.13 Scala.js License: MIT version Codecov made with love

Scala Crypto is a dependency free implementation of cryptographic hash functions.

It targets Scala and Scala.js.

Why Scala Crypto ?

All Scala SHA-256 hash libraries rely on Java libraries, especially java.security.MessageDigest and thus cannot be used in the context of a scala.js application or library. Having a dependency free library allows to publish for other platforms than JVM and in addition to scala.js this library will be published to scala-native once support for Scala 2.12 and 2.13 will be available.

Supported algorithms

Supported algorithms Information
SHA-256 Inspired by java implementation meyfa/java-sha256
SHA-512

How to use

Add to your sbt project:

Scala:

libraryDependencies += "com.dedipresta" %% "scala-crypto" % "1.0.0"

Scala.js:

libraryDependencies += "com.dedipresta" %%% "scala-crypto" % "1.0.0"

Then you may hash your String or Array[Byte]:

import com.dedipresta.crypto.hash.sha256.Sha256
Sha256.hash("Hello world!") // to get an array of bytes
Sha256.hashString("Scala.js!") // 25ed477793a2663fc5173a24f1a1f0750d5bd7f577dabee09452d82d3caff0e2

Copyright and License

All code is available to you under the MIT license, available at https://opensource.org/licenses/MIT and also in the LICENSE file.

com.dedipresta

Dedipresta

Versions

Version
1.0.0