Skip to content

Commit

Permalink
fix: suppress not needed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hamada147 committed Dec 12, 2022
1 parent ba7eefb commit 0b800c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ internal final object Base64 {
return decode0(src, 0, src.size, dst)
}

@Suppress("NAME_SHADOWING")
@Throws(IllegalArgumentException::class)
private fun outLength(src: ByteArray, sp: Int, sl: Int): Int {
var sp = sp
Expand Down Expand Up @@ -205,6 +206,7 @@ internal final object Base64 {
return 3 * ((len + 3) / 4) - paddings
}

@Suppress("NAME_SHADOWING")
@Throws(IllegalArgumentException::class)
private fun decode0(src: ByteArray, sp: Int, sl: Int, dst: ByteArray): Int {
var sp = sp
Expand Down Expand Up @@ -335,8 +337,7 @@ internal final object Base64 {
private val doPadding: Boolean
) {
private fun outLength(srclen: Int): Int {
var len = 0
len = if (doPadding) {
var len = if (doPadding) {
4 * ((srclen + 2) / 3)
} else {
val n = srclen % 3
Expand Down Expand Up @@ -439,6 +440,7 @@ internal final object Base64 {
return if (!doPadding) this else Encoder(isURL, newline, linemax, false)
}

@Suppress("UNUSED_CHANGED_VALUE")
private fun encode0(src: ByteArray, off: Int, end: Int, dst: ByteArray): Int {
val base64 = if (isURL) toBase64URL else toBase64
var sp = off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ actual final class HMAC actual constructor(
dataToHash += input
}

@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
override fun digest(): ByteArray {
val localKey = key
val localData = dataToHash
Expand Down

0 comments on commit 0b800c8

Please sign in to comment.