diff --git a/benchmark/src/androidTest/java/com/vitorpamplona/amethyst/benchmark/GiftWrapBenchmark.kt b/benchmark/src/androidTest/java/com/vitorpamplona/amethyst/benchmark/GiftWrapBenchmark.kt index ade8bc777..2705b13bc 100644 --- a/benchmark/src/androidTest/java/com/vitorpamplona/amethyst/benchmark/GiftWrapBenchmark.kt +++ b/benchmark/src/androidTest/java/com/vitorpamplona/amethyst/benchmark/GiftWrapBenchmark.kt @@ -129,14 +129,14 @@ class GiftWrapBenchmark { @Test fun tinyMessageHardCoded() { benchmarkRule.measureRepeated { - basePerformanceTest("Hola, que tal?", 2946) + basePerformanceTest("Hola, que tal?", 3402) } } @Test fun regularMessageHardCoded() { benchmarkRule.measureRepeated { - basePerformanceTest("Hi, honey, can you drop by the market and get some bread?", 3098) + basePerformanceTest("Hi, honey, can you drop by the market and get some bread?", 3746) } } @@ -145,7 +145,7 @@ class GiftWrapBenchmark { benchmarkRule.measureRepeated { basePerformanceTest( "My queen, you are nothing short of royalty to me. You possess more beauty in the nail of your pinkie toe than everything else in this world combined. I am astounded by your grace, generosity, and graciousness. I am so lucky to know you. ", - 3738 + 5114 ) } } diff --git a/benchmark/src/androidTest/java/com/vitorpamplona/amethyst/benchmark/GiftWrapReceivingBenchmark.kt b/benchmark/src/androidTest/java/com/vitorpamplona/amethyst/benchmark/GiftWrapReceivingBenchmark.kt index f2782e428..24463e95f 100644 --- a/benchmark/src/androidTest/java/com/vitorpamplona/amethyst/benchmark/GiftWrapReceivingBenchmark.kt +++ b/benchmark/src/androidTest/java/com/vitorpamplona/amethyst/benchmark/GiftWrapReceivingBenchmark.kt @@ -144,7 +144,7 @@ class GiftWrapReceivingBenchmark { val wrap = createWrap(sender, receiver) benchmarkRule.measureRepeated { - assertNotNull(CryptoUtils.decryptNIP44v1(wrap.content, sender.keyPair.privKey!!, wrap.pubKey.hexToByteArray())) + assertNotNull(CryptoUtils.decryptNIP44v2(wrap.content, receiver.keyPair.privKey!!, wrap.pubKey.hexToByteArray())) } } @@ -155,7 +155,7 @@ class GiftWrapReceivingBenchmark { val wrap = createWrap(sender, receiver) - val innerJson = CryptoUtils.decryptNIP44v1(wrap.content, receiver.keyPair.privKey!!, wrap.pubKey.hexToByteArray()) + val innerJson = CryptoUtils.decryptNIP44v2(wrap.content, receiver.keyPair.privKey!!, wrap.pubKey.hexToByteArray()) benchmarkRule.measureRepeated { assertNotNull(innerJson?.let { Event.fromJson(it) }) @@ -170,7 +170,7 @@ class GiftWrapReceivingBenchmark { val seal = createSeal(sender, receiver) benchmarkRule.measureRepeated { - assertNotNull(CryptoUtils.decryptNIP44v1(seal.content, sender.keyPair.privKey!!, seal.pubKey.hexToByteArray())) + assertNotNull(CryptoUtils.decryptNIP44v2(seal.content, receiver.keyPair.privKey!!, seal.pubKey.hexToByteArray())) } } @@ -181,7 +181,7 @@ class GiftWrapReceivingBenchmark { val seal = createSeal(sender, receiver) - val innerJson = CryptoUtils.decryptNIP44v1(seal.content, receiver.keyPair.privKey!!, seal.pubKey.hexToByteArray()) + val innerJson = CryptoUtils.decryptNIP44v2(seal.content, receiver.keyPair.privKey!!, seal.pubKey.hexToByteArray()) benchmarkRule.measureRepeated { assertNotNull(innerJson?.let { Gossip.fromJson(it) })