Skip to content

Commit

Permalink
fix: RSA compare error in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
amosavian committed Sep 17, 2024
1 parent 685bd48 commit eacf44f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Sources/JWSETKit/Cryptography/Compression/Compressor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import SWCompression

extension JSONWebCompressionAlgorithm {
var swCompressor: some CompressionAlgorithm.Type {
var swCompressor: any CompressionAlgorithm.Type {
get throws {
switch self {
case .deflate:
Expand All @@ -21,7 +21,7 @@ extension JSONWebCompressionAlgorithm {
}
}

var swDecompressor: some DecompressionAlgorithm.Type {
var swDecompressor: any DecompressionAlgorithm.Type {
get throws {
switch self {
case .deflate:
Expand Down
1 change: 0 additions & 1 deletion Sources/JWSETKit/Cryptography/EC/JWK-EC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ enum ECHelper {
throw CryptoKitError.incorrectParameterSize
}
}

return stride(from: 0, to: data.count, by: keyLength / 8).map {
data.dropFirst($0).prefix(keyLength / 8)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWSETKit/Cryptography/RSA/JWK-RSA.swift
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ extension CryptoSwift.RSA: JSONWebDecryptingKey {
}

public static func == (lhs: CryptoSwift.RSA, rhs: CryptoSwift.RSA) -> Bool {
lhs.n == rhs.n && lhs.e == rhs.e
lhs.externalRepresentation() == rhs.externalRepresentation()
}

public func hash(into hasher: inout Hasher) {
Expand Down

0 comments on commit eacf44f

Please sign in to comment.