Skip to content

Commit f2ae996

Browse files
committed
ktlint
1 parent 580925b commit f2ae996

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

runtime/auth/aws-signing-default/common/src/aws/smithy/kotlin/runtime/auth/awssigning/SigV4SignatureCalculator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ internal class SigV4SignatureCalculator(override val sha256Provider: HashSupplie
2323
val kService = hmac(kRegion, config.service)
2424
return hmac(kService, "aws4_request")
2525
}
26-
}
26+
}

runtime/auth/aws-signing-default/common/src/aws/smithy/kotlin/runtime/auth/awssigning/SigV4aSignatureCalculator.kt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,16 @@ internal class SigV4aSignatureCalculator(override val sha256Provider: HashSuppli
5959
*/
6060
private fun fixedInputString(accessKeyId: String, counter: Byte): ByteArray =
6161
byteArrayOf(0x00, 0x00, 0x00, 0x01) + // FIXME CRT implementation (4 bytes) and internal docs (1 byte) conflict.
62-
"AWS4-ECDSA-P256-SHA256".encodeToByteArray() +
63-
byteArrayOf(0x00) +
64-
accessKeyId.encodeToByteArray() +
65-
counter +
66-
byteArrayOf(0x00, 0x00, 0x01, 0x00) // FIXME CRT implementation (4 bytes) and internal docs (2 bytes) conflict.
62+
"AWS4-ECDSA-P256-SHA256".encodeToByteArray() +
63+
byteArrayOf(0x00) +
64+
accessKeyId.encodeToByteArray() +
65+
counter +
66+
byteArrayOf(0x00, 0x00, 0x01, 0x00) // FIXME CRT implementation (4 bytes) and internal docs (2 bytes) conflict.
6767
}
6868

6969
// Convert [this] [ByteArray] to a positive [BigInteger]
70-
private fun ByteArray.toPositiveBigInteger(): BigInteger {
71-
return if (isNotEmpty() && (get(0).toInt() and 0x80) != 0) {
72-
BigInteger(byteArrayOf(0x00) + this) // Prepend 0x00 to ensure positive value
73-
} else {
74-
BigInteger(this)
75-
}
70+
private fun ByteArray.toPositiveBigInteger(): BigInteger = if (isNotEmpty() && (get(0).toInt() and 0x80) != 0) {
71+
BigInteger(byteArrayOf(0x00) + this) // Prepend 0x00 to ensure positive value
72+
} else {
73+
BigInteger(this)
7674
}

runtime/auth/aws-signing-default/common/src/aws/smithy/kotlin/runtime/auth/awssigning/SigV4xSignatureCalculator.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ internal val AwsSigningAlgorithm.signingName: String
6565
AwsSigningAlgorithm.SIGV4_ASYMMETRIC -> "AWS4-ECDSA-P256-SHA256"
6666
}
6767

68-
6968
private const val HEADER_TIMESTAMP_TYPE: Byte = 8
7069

7170
/**

0 commit comments

Comments
 (0)