Skip to content

Commit

Permalink
fix bigint serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Aug 14, 2023
1 parent 09f46cd commit 4ac344a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/TorusUtils/TorusUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ open class TorusUtils: AbstractTorusUtils {
let key = BigInt(torusKey.privateKey, radix: 16)!
let result = key - BigInt(torusKey.nonce)
let postboxKey = result.modulus(modulusValue)
return postboxKey.magnitude.serialize().toHexString()
return BigUInt(postboxKey).serialize().suffix(64).toHexString()
}
return torusKey.privateKey
}
Expand Down

0 comments on commit 4ac344a

Please sign in to comment.