Browse Source

Make id of tck public

develop 0.0.1-alpha-3
Raffaele Mignone 2 years ago
parent
commit
190c7f5346
Signed by: norangebit GPG Key ID: F5255658CB220573
  1. 4
      build.gradle.kts
  2. 2
      src/main/kotlin/it/unisannio/assd/tkn/key/TemporaryContactKey.kt
  3. 2
      src/main/kotlin/it/unisannio/assd/tkn/key/TemporaryContactNumber.kt

4
build.gradle.kts

@ -7,7 +7,7 @@ plugins {
}
group = "it.unisannio.assd.untori"
version = "0.0.1-alpha-2"
version = "0.0.1-alpha-3"
repositories {
mavenCentral()
@ -67,7 +67,7 @@ bintray {
setLicenses("MIT")
desc = description
version.name = "0.0.1-alpha-2"
version.name = "0.0.1-alpha-3"
}
}

2
src/main/kotlin/it/unisannio/assd/tkn/key/TemporaryContactKey.kt

@ -10,7 +10,7 @@ import java.security.MessageDigest
class TemporaryContactKey private constructor(
private val key: ByteArray,
private val index: Short
val index: Short
) {
fun nextTemporaryContactKey(rvk: ReportVerificationKey): TemporaryContactKey {
val hmac = MessageDigest.getInstance("SHA-256").apply {

2
src/main/kotlin/it/unisannio/assd/tkn/key/TemporaryContactNumber.kt

@ -10,6 +10,8 @@ class TemporaryContactNumber(
) {
fun toHexString() = number.toHexString()
override fun toString(): String = toUUID().toString()
fun toUUID(): UUID {
val byteBuffer = ByteBuffer.wrap(number)
val high = byteBuffer.long

Loading…
Cancel
Save