mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 14:09:40 +01:00
rearranges the crypto package into separate nips and reduces the amount of circular dependencies.
This commit is contained in:
@@ -50,7 +50,7 @@ class CryptoBenchmark {
|
||||
val keyPair2 = KeyPair()
|
||||
|
||||
benchmarkRule.measureRepeated {
|
||||
assertNotNull(CryptoUtils.getSharedSecretNIP44v1(keyPair1.privKey!!, keyPair2.pubKey))
|
||||
assertNotNull(CryptoUtils.nip44.v1.getSharedSecret(keyPair1.privKey!!, keyPair2.pubKey))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class CryptoBenchmark {
|
||||
val keyPair2 = KeyPair()
|
||||
|
||||
benchmarkRule.measureRepeated {
|
||||
assertNotNull(CryptoUtils.computeSharedSecretNIP44v1(keyPair1.privKey!!, keyPair2.pubKey))
|
||||
assertNotNull(CryptoUtils.nip44.v1.computeSharedSecret(keyPair1.privKey!!, keyPair2.pubKey))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ class GiftWrapReceivingBenchmark {
|
||||
|
||||
benchmarkRule.measureRepeated {
|
||||
assertNotNull(
|
||||
CryptoUtils.decryptNIP44v2(
|
||||
CryptoUtils.decryptNIP44(
|
||||
wrap.content,
|
||||
receiver.keyPair.privKey!!,
|
||||
wrap.pubKey.hexToByteArray(),
|
||||
@@ -182,7 +182,7 @@ class GiftWrapReceivingBenchmark {
|
||||
val wrap = createWrap(sender, receiver)
|
||||
|
||||
val innerJson =
|
||||
CryptoUtils.decryptNIP44v2(
|
||||
CryptoUtils.decryptNIP44(
|
||||
wrap.content,
|
||||
receiver.keyPair.privKey!!,
|
||||
wrap.pubKey.hexToByteArray(),
|
||||
@@ -200,7 +200,7 @@ class GiftWrapReceivingBenchmark {
|
||||
|
||||
benchmarkRule.measureRepeated {
|
||||
assertNotNull(
|
||||
CryptoUtils.decryptNIP44v2(
|
||||
CryptoUtils.decryptNIP44(
|
||||
seal.content,
|
||||
receiver.keyPair.privKey!!,
|
||||
seal.pubKey.hexToByteArray(),
|
||||
@@ -217,7 +217,7 @@ class GiftWrapReceivingBenchmark {
|
||||
val seal = createSeal(sender, receiver)
|
||||
|
||||
val innerJson =
|
||||
CryptoUtils.decryptNIP44v2(
|
||||
CryptoUtils.decryptNIP44(
|
||||
seal.content,
|
||||
receiver.keyPair.privKey!!,
|
||||
seal.pubKey.hexToByteArray(),
|
||||
|
||||
Reference in New Issue
Block a user