Skip to content

Commit

Permalink
Merge pull request #80 from torusresearch/fix_hexstring_hash_aggregate
Browse files Browse the repository at this point in the history
fix: use hexString for hash in getAggregateTorusKey
  • Loading branch information
himanshuchawla009 authored Dec 11, 2024
2 parents b3d0079 + ef6ecfa commit 67f947d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CustomAuth.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "CustomAuth"
spec.version = "11.0.1"
spec.version = "11.0.2"
spec.platform = :ios, "14.0"
spec.summary = "Swift SDK that allows applications to directly interact with the Torus Network, similar to how Torus Wallet does."
spec.homepage = "https://github.com/torusresearch/customauth-swift-sdk"
Expand Down
2 changes: 1 addition & 1 deletion Sources/CustomAuth/Common/TorusGenericContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
public class TorusGenericContainer: Codable {
public let params: [String: String]

init(params: [String: String]) {
public init(params: [String: String]) {
self.params = params
}
}
4 changes: 2 additions & 2 deletions Sources/CustomAuth/CustomAuth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ public class CustomAuth {

aggregateIdTokenSeeds.sort()
let joined = aggregateIdTokenSeeds.joined(separator: "\u{29}").data(using: .utf8)!
let aggregateIdToken = try keccak256(data: joined)
let aggregateIdToken = try keccak256(data: joined).hexString
let params: VerifierParams = VerifierParams(verifier_id: verifierParams.verifier_id, extended_verifier_id: verifierParams.extended_verifier_id, sub_verifier_ids: subVerifierIds, verify_params: verifyParams)

return try await torus.retrieveShares(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierParams: params, idToken: String(data: aggregateIdToken, encoding: .utf8)!)
return try await torus.retrieveShares(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierParams: params, idToken: aggregateIdToken)
}
}

0 comments on commit 67f947d

Please sign in to comment.