mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-27 07:05:20 +00:00
Unify SHA256 hash and hex usages (#687)
This commit is contained in:
@@ -226,10 +226,7 @@ struct NostrIdentityBridge {
|
||||
}
|
||||
}
|
||||
// As a final fallback, hash the seed+msg and try again
|
||||
var combined = Data()
|
||||
combined.append(seed)
|
||||
combined.append(msg)
|
||||
let fallback = Data(CryptoKit.SHA256.hash(data: combined))
|
||||
let fallback = (seed + msg).sha256Hash()
|
||||
return try NostrIdentity(privateKeyData: fallback)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user