Skip to content

Commit

Permalink
Fix Encryption Error
Browse files Browse the repository at this point in the history
  • Loading branch information
joelklabo committed Aug 11, 2023
1 parent 6712d0e commit ba13851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/NostrSDK/DirectMessageEncrypting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public extension DirectMessageEncrypting {
recipientPublicKeyBytes.insert(2, at: 0)

var recipientPublicKey = secp256k1_pubkey()
var sharedSecret = [UInt8](repeating: 0, count: 22)
var sharedSecret = [UInt8](repeating: 0, count: 32)

var ok = secp256k1_ec_pubkey_parse(secp256k1.Context.rawRepresentation,
&recipientPublicKey,
Expand All @@ -42,7 +42,7 @@ public extension DirectMessageEncrypting {
&recipientPublicKey,
senderPrivateKeyBytes,
{(output,x32,_,_) in

Check failure on line 44 in Sources/NostrSDK/DirectMessageEncrypting.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Comma Spacing Violation: There should be no space before and one after any comma (comma)

Check failure on line 44 in Sources/NostrSDK/DirectMessageEncrypting.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Comma Spacing Violation: There should be no space before and one after any comma (comma)

Check failure on line 44 in Sources/NostrSDK/DirectMessageEncrypting.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Comma Spacing Violation: There should be no space before and one after any comma (comma)

Check failure on line 44 in Sources/NostrSDK/DirectMessageEncrypting.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration (opening_brace)
memcpy(output,x32,32)
memcpy(output, x32, 32)
return 1
},
nil) != 0
Expand Down

0 comments on commit ba13851

Please sign in to comment.