diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip49PrivKeyEnc/SCrypt.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip49PrivKeyEnc/SCrypt.kt index d49660aed..14a3fe884 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip49PrivKeyEnc/SCrypt.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip49PrivKeyEnc/SCrypt.kt @@ -76,8 +76,8 @@ object SCrypt { ): ByteArray { require(!(n < 2 || (n and (n - 1)) != 0)) { "N must be a power of 2 greater than 1" } - require(n <= Int.Companion.MAX_VALUE / 128 / r) { "Parameter N is too large" } - require(r <= Int.Companion.MAX_VALUE / 128 / p) { "Parameter r is too large" } + require(n <= Int.MAX_VALUE / 128 / r) { "Parameter N is too large" } + require(r <= Int.MAX_VALUE / 128 / p) { "Parameter r is too large" } val mac = MacInstance("HmacSHA256", passwd) diff --git a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/TestResourceLoader.kt b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/TestResourceLoader.kt index 81c31d65b..633888a45 100644 --- a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/TestResourceLoader.kt +++ b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/TestResourceLoader.kt @@ -20,26 +20,6 @@ */ package com.vitorpamplona.quartz -/** - * Copyright (c) 2025 Vitor Pamplona - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - * Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ expect class TestResourceLoader() { fun loadString(file: String): String } diff --git a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip10Notes/urls/UrlsDetectorTest.kt b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip10Notes/urls/UrlsDetectorTest.kt index b9e970077..0d526ab17 100644 --- a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip10Notes/urls/UrlsDetectorTest.kt +++ b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip10Notes/urls/UrlsDetectorTest.kt @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2025 Vitor Pamplona * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/quartz/src/commonTest/kotlin/nip06KeyDerivationCommon/Bip32SeedDerivationCommonTest.kt b/quartz/src/commonTest/kotlin/nip06KeyDerivationCommon/Bip32SeedDerivationCommonTest.kt index 255c1bbb3..4a6ccb8f9 100644 --- a/quartz/src/commonTest/kotlin/nip06KeyDerivationCommon/Bip32SeedDerivationCommonTest.kt +++ b/quartz/src/commonTest/kotlin/nip06KeyDerivationCommon/Bip32SeedDerivationCommonTest.kt @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2025 Vitor Pamplona * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/quartz/src/commonTest/kotlin/nip06KeyDerivationCommon/Nip06CommonTest.kt b/quartz/src/commonTest/kotlin/nip06KeyDerivationCommon/Nip06CommonTest.kt index 97a818ac3..5feaa1621 100644 --- a/quartz/src/commonTest/kotlin/nip06KeyDerivationCommon/Nip06CommonTest.kt +++ b/quartz/src/commonTest/kotlin/nip06KeyDerivationCommon/Nip06CommonTest.kt @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2025 Vitor Pamplona * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/Buffer.kt b/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/Buffer.kt index 37edf30b6..8db20ceda 100644 --- a/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/Buffer.kt +++ b/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/Buffer.kt @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2025 Vitor Pamplona * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -21,6 +21,7 @@ package com.vitorpamplona.quartz.utils.io // Credits: skolson, from https://github.com/skolson/KmpIO +@Suppress("ktlint") abstract class Buffer internal constructor( markPosition: Int, pos: Int, diff --git a/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/ByteBuffers.kt b/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/ByteBuffers.kt index a792c198d..7f82d60ab 100644 --- a/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/ByteBuffers.kt +++ b/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/ByteBuffers.kt @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2025 Vitor Pamplona * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/CustomBitSet.kt b/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/CustomBitSet.kt index 80f0cb86a..cba6e75ba 100644 --- a/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/CustomBitSet.kt +++ b/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/CustomBitSet.kt @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2025 Vitor Pamplona * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/Extensions.kt b/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/Extensions.kt index cedb03b02..75d892e59 100644 --- a/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/Extensions.kt +++ b/quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/io/Extensions.kt @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2025 Vitor Pamplona * * Permission is hereby granted, free of charge, to any person obtaining a copy of