TakeScoop/SwiftyRSA

Why i am unable to generate and use a public a key with more than 8192 bits ?

rehmanali-vaival opened this issue · 0 comments

This is how i imported the library inside Podfile:
pod 'SwiftyRSA'

Error while i am generating keys:
keyGenerationFailed(error: Optional(Error Domain=NSOSStatusErrorDomain Code=-50 "Key generation failed, error -50" UserInfo={numberOfErrorsDeep=0, NSDescription=Key generation failed, error -50}))

Error LocalizedDescription:
The operation couldn’t be completed. (SwiftyRSA.SwiftyRSAError error 1.)

Even i generated keys via an external resource but this library is not accepting for more than 8192 bits. Here's that base64 public key for which i want to proceed for encryption.

MIIIIjANBgkqhkiG9w0BAQEFAAOCCA8AMIIICgKCCAEAiaNDm85g0YDxFxo0MS6yHgMQLIcy/M/vKFh6BZQmONsLPmISPTRUETsvnQ0LnD6gCIZiITv4eKikCuiJmHJ5l30cRADKo7lje3Uqt3zR+IL3Je8N5O1vDkSSf/KsEaxNpHlSBtFxo/EoaNswaMa93RaeTDMdpv8THX6+pX4+SwCgN3nGjwFrhjGKwW/Y8bfMZVHNFcdecvrChH7ukRfJKqiFXlDJDXTSUOFl20F/94J+lY4+BLdCjaQdT295qpcRpI6UFHA9qYcwtxCaccYn0UK0AdESltkskJTA4ULMhQ7s+iU+uhArbbjPWJht6h0XE1kfK9m339SvaDqe7y8ZAI+Ivoes4ytEDQFgnxeuu3WKdr5Sz4XsDW8BT2d5mYu8RO9woluKReUlQocp546H10xUDGoA/xAAs6QwITCMyih826At8hQ8DauI9qzifoFoqv1X43TzfaNu5/qT2I2lOizTvojQRbvH+QKO9SENlTOEy5Y3Ot44aXDr7xcwKvRzpb0edkGSFG0iJX74QsdkX3W1gb/LZyMdMmvsZt1cI5bufPKaB5pzGHrvozEbpNygSgyZT2lzGqu7TNpOzRF3zbBq+brtW5WEc1ErOgrm3C4NaKqd+YgonxdRYrEtVMir8X0xbPwxurRtWdveTg1eq8CQ/Iuo/rNPKy+dtSqmwVm1d/hOVvqtHneG4d+TQOzxt1T66L2+5Z9TyMcvGAy4kTL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