Wstunes / SwiftyJWT

A library to generate JWT with Swift
MIT License
48 stars 30 forks source link

Cannot run RSAKey.init #3

Closed cwseric closed 6 years ago

cwseric commented 6 years ago

Hello,

I'm trying to encode my private key and running into an issue. The line I'm at is: let privateKey = try! RSAKey.init(base64String: "my key string", keyType: .PRIVATE)

The error I'm getting is Use of unresolved identifier 'RSAKey'

I didn't see anything in the docs about how to use RSAKey. Is there something else that needs to be loaded in to use it?

Thanks

cwseric commented 6 years ago

I figured out the issue. I needed to import "SwiftyCrypto" as well. I think including the imports that you need would be very helpful to beginning iOS developers.