Skip to content

Commit 262d7e7

Browse files
committed
Transfer to pt.kcry package
1 parent 8f945ce commit 262d7e7

File tree

12 files changed

+48
-31
lines changed

12 files changed

+48
-31
lines changed

CHANGELOG.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
All notable changes to this project will be documented in this file.
44

55
## [unreleased]
6+
- Migrated to package `pt.kcry.sha`
67
- Switched to scalajs-1.8.0
78
- Switched to scala-native-0.4.2
89
- Switched to scala-2.13.7
@@ -23,10 +24,10 @@ All notable changes to this project will be documented in this file.
2324
## [1.0.0] - 2021-07-11
2425
- The first public release as dedicated project.
2526

26-
[unreleased]: https://github.com/catap/scala-sha/compare/v1.2.1...HEAD
27-
[1.2.1]: https://github.com/catap/scala-sha/compare/v1.2.0...v1.2.1
28-
[1.2.0]: https://github.com/catap/scala-sha/compare/v1.1.1...v1.2.0
29-
[1.1.1]: https://github.com/catap/scala-sha/compare/v1.1.0...v1.1.1
30-
[1.1.0]: https://github.com/catap/scala-sha/compare/v1.0.0...v1.1.0
31-
[1.0.0]: https://github.com/catap/scala-sha/releases/tagv1.0.0
27+
[unreleased]: https://github.com/kcrypt/scala-sha/compare/v1.2.1...HEAD
28+
[1.2.1]: https://github.com/kcrypt/scala-sha/compare/v1.2.0...v1.2.1
29+
[1.2.0]: https://github.com/kcrypt/scala-sha/compare/v1.1.1...v1.2.0
30+
[1.1.1]: https://github.com/kcrypt/scala-sha/compare/v1.1.0...v1.1.1
31+
[1.1.0]: https://github.com/kcrypt/scala-sha/compare/v1.0.0...v1.1.0
32+
[1.0.0]: https://github.com/kcrypt/scala-sha/releases/tagv1.0.0
3233

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ If you need very fast and secure hash function for scala I suggest to use
1616

1717
You can use it as
1818
```
19-
libraryDependencies += "ky.korins" %%% "sha" % "x.x.x"
19+
libraryDependencies += "pt.kcry" %%% "sha" % "x.x.x"
2020
```
2121
The latest version is ![maven-central]
2222

2323
API is pretty simple and quite limited :)
2424
```
25-
scala> import ky.korins.sha._
26-
import ky.korins.sha._
25+
scala> import pt.kcry.sha._
26+
import pt.kcry.sha._
2727
2828
scala> Sha2_256.hash("abc".getBytes())
2929
val res1: Array[Byte] = Array(-70, 120, 22, -65, -113, 1, -49, -22, 65, 65, 64, -34, 93, -82, 34, 35, -80, 3, 97, -93, -106, 23, 122, -100, -76, 16, -1, 97, -14, 0, 21, -83)
@@ -34,11 +34,11 @@ scala>
3434
You may also create a new object from specified hash to `update` it, and at some
3535
point `finish` it like this:
3636
```
37-
scala> import ky.korins.sha._
38-
import ky.korins.sha._
37+
scala> import pt.kcry.sha._
38+
import pt.kcry.sha._
3939
4040
scala> val sha1 = new Sha1()
41-
val sha1: ky.korins.sha.Sha1 = ky.korins.sha.Sha1@1224e1b6
41+
val sha1: pt.kcry.sha.Sha1 = pt.kcry.sha.Sha1@1224e1b6
4242
4343
scala> sha1.update("abc".getBytes(), 0, 2)
4444
@@ -93,4 +93,4 @@ Blake3Benchmark.newHasher 16384 256 avgt 5 26,472 ± 0,023 us/
9393
Blake3Benchmark.newHasher 16384 512 avgt 5 26,641 ± 0,131 us/op
9494
```
9595

96-
[maven-central]: https://img.shields.io/maven-central/v/ky.korins/sha_2.13?style=flat-square
96+
[maven-central]: https://img.shields.io/maven-central/v/pt.kcry/sha_2.13?style=flat-square

bench/src/main/scala/ky/korins/sha/benchmark/ShaBenchmark.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
*
44
* Written in 2020, 2021 by Kirill A. Korinsky <[email protected]>
55
*
6+
* Supported since 2022 by Kcrypt Lab UG <[email protected]>
7+
*
68
* This work is released into the public domain with CC0 1.0.
79
*/
810

9-
package ky.korins.sha
11+
package pt.kcry.sha
1012
package benchmark
1113

1214
import org.openjdk.jmh.annotations._

build.sbt

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ lazy val scala31 = "3.1.0"
1111
lazy val scalatestVersion = "3.2.10"
1212

1313
name := "sha"
14-
ThisBuild / organization := "ky.korins"
14+
ThisBuild / organization := "pt.kcry"
1515

1616
ThisBuild / dynverSeparator := "-"
1717

@@ -46,7 +46,7 @@ lazy val sha = crossProject(JSPlatform, JVMPlatform, NativePlatform)
4646
}
4747
),
4848
headerLicense := LicenseDefinition.template,
49-
buildInfoPackage := "ky.korins.sha",
49+
buildInfoPackage := "pt.kcry.sha",
5050
libraryDependencies ++= Seq(
5151
"org.scalatest" %%% "scalatest" % scalatestVersion % Test
5252
)

project/LicenseDefinition.scala

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ object LicenseDefinition {
99
|
1010
|Written in 2020, 2021 by Kirill A. Korinsky <[email protected]>
1111
|
12+
|Supported since 2022 by Kcrypt Lab UG <[email protected]>
13+
|
1214
|This work is released into the public domain with CC0 1.0.
1315
|""".stripMargin
1416
)
1517
)
1618

1719
val licenses = Seq(
1820
"CC0 1.0 Universal" -> url(
19-
"https://github.com/catap/scala-sha/blob/master/LICENSE.txt"
20-
),
21-
"Apache License 2.0" -> url(
22-
"https://github.com/catap/scala-sha/blob/master/LICENSE.txt"
21+
"https://github.com/kcrypt/scala-sha/blob/master/LICENSE.txt"
2322
)
2423
)
2524
}

shared/src/main/scala/ky/korins/sha/Hash.scala renamed to shared/src/main/scala/pt/kcry/sha/Hash.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
*
44
* Written in 2020, 2021 by Kirill A. Korinsky <[email protected]>
55
*
6+
* Supported since 2022 by Kcrypt Lab UG <[email protected]>
7+
*
68
* This work is released into the public domain with CC0 1.0.
79
*/
810

9-
package ky.korins.sha
11+
package pt.kcry.sha
1012

1113
trait Hash {
1214
def update(bytes: Array[Byte], off: Int, len: Int): Unit

shared/src/main/scala/ky/korins/sha/Sha0.scala renamed to shared/src/main/scala/pt/kcry/sha/Sha0.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
*
44
* Written in 2020, 2021 by Kirill A. Korinsky <[email protected]>
55
*
6+
* Supported since 2022 by Kcrypt Lab UG <[email protected]>
7+
*
68
* This work is released into the public domain with CC0 1.0.
79
*/
810

9-
package ky.korins.sha
11+
package pt.kcry.sha
1012

1113
/**
1214
* Keep in mind that SHA-0 is broken and I implemented it just for fun :)

shared/src/main/scala/ky/korins/sha/Sha1.scala renamed to shared/src/main/scala/pt/kcry/sha/Sha1.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
*
44
* Written in 2020, 2021 by Kirill A. Korinsky <[email protected]>
55
*
6+
* Supported since 2022 by Kcrypt Lab UG <[email protected]>
7+
*
68
* This work is released into the public domain with CC0 1.0.
79
*/
810

9-
package ky.korins.sha
11+
package pt.kcry.sha
1012

1113
/**
1214
* Quite ugly but fast enough implementation of SHA-1.

shared/src/main/scala/ky/korins/sha/Sha2.scala renamed to shared/src/main/scala/pt/kcry/sha/Sha2.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
*
44
* Written in 2020, 2021 by Kirill A. Korinsky <[email protected]>
55
*
6+
* Supported since 2022 by Kcrypt Lab UG <[email protected]>
7+
*
68
* This work is released into the public domain with CC0 1.0.
79
*/
810

9-
package ky.korins.sha
11+
package pt.kcry.sha
1012

1113
/**
1214
* Quite ugly but fast enough implementation of SHA-2 for 32 bit case.
@@ -15,6 +17,7 @@ package ky.korins.sha
1517
*/
1618
sealed trait Sha2_32bit extends BlockedHash[Array[Int]] {
1719
import Sha2._
20+
1821
import java.lang.Integer.rotateRight
1922

2023
protected val H: Array[Int]
@@ -106,6 +109,7 @@ sealed trait Sha2_32bit extends BlockedHash[Array[Int]] {
106109
*/
107110
sealed trait Sha2_64bit extends BlockedHash[Array[Long]] {
108111
import Sha2._
112+
109113
import java.lang.Long.rotateRight
110114

111115
protected val H: Array[Long]

shared/src/main/scala/ky/korins/sha/Sha3.scala renamed to shared/src/main/scala/pt/kcry/sha/Sha3.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
*
44
* Written in 2020, 2021 by Kirill A. Korinsky <[email protected]>
55
*
6+
* Supported since 2022 by Kcrypt Lab UG <[email protected]>
7+
*
68
* This work is released into the public domain with CC0 1.0.
79
*/
810

9-
package ky.korins.sha
11+
package pt.kcry.sha
1012

1113
/**
1214
* This implementation is based on https://keccak.team/keccak_specs_summary.html

shared/src/test/scala/ky/korins/sha/HashTestVectors.scala renamed to shared/src/test/scala/pt/kcry/sha/HashTestVectors.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
*
44
* Written in 2020, 2021 by Kirill A. Korinsky <[email protected]>
55
*
6+
* Supported since 2022 by Kcrypt Lab UG <[email protected]>
7+
*
68
* This work is released into the public domain with CC0 1.0.
79
*/
810

9-
package ky.korins.sha
11+
package pt.kcry.sha
1012

1113
import org.scalatest._
1214
import org.scalatest.matchers.should

sonatype.sbt

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import sbt.url
22
import xerial.sbt.Sonatype.GitHubHosting
33

4-
ThisBuild / sonatypeProfileName := "ky.korins"
4+
ThisBuild / sonatypeProfileName := "pt.kcry"
55
ThisBuild / publishMavenStyle := true
66
ThisBuild / sonatypeProjectHosting := Some(
7-
GitHubHosting("catap", "scala-sha", "[email protected]")
7+
GitHubHosting("kcrypt", "scala-sha", "[email protected]")
88
)
99
ThisBuild / licenses := LicenseDefinition.licenses
10-
ThisBuild / homepage := Some(url("https://github.com/catap/scala-sha"))
10+
ThisBuild / homepage := Some(url("https://github.com/kcrypt/scala-sha"))
1111
ThisBuild / scmInfo := Some(
1212
ScmInfo(
13-
url("https://github.com/catap/scala-sha"),
14-
"scm:[email protected]:catap/scala-sha.git"
13+
url("https://github.com/kcrypt/scala-sha"),
14+
"scm:[email protected]:kcrypt/scala-sha.git"
1515
)
1616
)
1717
ThisBuild / developers := List(
@@ -22,3 +22,4 @@ ThisBuild / developers := List(
2222
url = url("https://github.com/catap")
2323
)
2424
)
25+
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"

0 commit comments

Comments
 (0)