We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 686c695 commit 0699bb1Copy full SHA for 0699bb1
Sources/APNSwift/APNSwiftSigner.swift
@@ -70,8 +70,9 @@ public struct APNSwiftSigner {
70
let lens = Int(BN_bn2bin(.make(optional: s), &sb))
71
72
var signatureBytes = ByteBufferAllocator().buffer(capacity: lenr + lens)
73
- signatureBytes.writeBytes(rb[0..<lenr])
74
- signatureBytes.writeBytes(sb[0..<lens])
+ let allZeroes = Array(repeating: UInt8(0), count: 32)
+ signatureBytes.writeBytes([allZeroes, rb].joined().suffix(32))
75
+ signatureBytes.writeBytes([allZeroes, sb].joined().suffix(32))
76
return signatureBytes
77
}
78
0 commit comments