Final (?) Refactoring
Remove "encoded" from some function names, remove obsolete functions.
This commit is contained in:
1 parent
0b03b249cb
commit
2dd71befb2
10 files changed
+86
-163
No files matched your search
+3
-3
@@ -25,7 +25,7 @@ actual object Ed25519LowLevel {
|
||||
return result
|
||||
}
|
||||
|
||||
actual fun encodedPointFromUniform(uniform: UByteArray): UByteArray {
|
||||
actual fun pointFromUniform(uniform: UByteArray): UByteArray {
|
||||
val result = UByteArray(crypto_core_ed25519_BYTES)
|
||||
|
||||
sodiumJna.crypto_core_ed25519_from_uniform(result.asByteArray(), uniform.asByteArray())
|
||||
@@ -34,11 +34,11 @@ actual object Ed25519LowLevel {
|
||||
return result
|
||||
}
|
||||
|
||||
actual fun randomEncodedPoint(): UByteArray = UByteArray(crypto_core_ed25519_BYTES).also {
|
||||
actual fun randomPoint(): UByteArray = UByteArray(crypto_core_ed25519_BYTES).also {
|
||||
sodiumJna.crypto_core_ed25519_random(it.asByteArray())
|
||||
}
|
||||
|
||||
actual fun randomEncodedScalar(): UByteArray = UByteArray(crypto_core_ed25519_SCALARBYTES).also {
|
||||
actual fun randomScalar(): UByteArray = UByteArray(crypto_core_ed25519_SCALARBYTES).also {
|
||||
sodiumJna.crypto_core_ed25519_scalar_random(it.asByteArray())
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ actual object Ristretto255LowLevel {
|
||||
return result
|
||||
}
|
||||
|
||||
actual fun encodedPointFromHash(hash: UByteArray): UByteArray {
|
||||
actual fun pointFromHash(hash: UByteArray): UByteArray {
|
||||
val result = UByteArray(crypto_core_ristretto255_BYTES)
|
||||
|
||||
sodiumJna.crypto_core_ristretto255_from_hash(result.asByteArray(), hash.asByteArray())
|
||||
@@ -33,11 +33,11 @@ actual object Ristretto255LowLevel {
|
||||
return result
|
||||
}
|
||||
|
||||
actual fun randomEncodedPoint(): UByteArray = UByteArray(crypto_core_ristretto255_BYTES).also {
|
||||
actual fun randomPoint(): UByteArray = UByteArray(crypto_core_ristretto255_BYTES).also {
|
||||
sodiumJna.crypto_core_ristretto255_random(it.asByteArray())
|
||||
}
|
||||
|
||||
actual fun randomEncodedScalar(): UByteArray = UByteArray(crypto_core_ristretto255_SCALARBYTES).also {
|
||||
actual fun randomScalar(): UByteArray = UByteArray(crypto_core_ristretto255_SCALARBYTES).also {
|
||||
sodiumJna.crypto_core_ristretto255_scalar_random(it.asByteArray())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user