Closed jsyrjala closed 1 year ago
As you can see in the documentation WebPushBuilder.with_vapid
simply uses an ES256KeyPair
, as defined by the jwt_simple
crate, which is also re-exported at the root of the web-push-native
crate. You should therefore be able to use ES256KeyPair::generate
to generate a suitable key pair. Because this and various other methods to retrieve key pairs are already defined for us, web-push-native
does not define its own methods of generating key pairs.
I hope this answers your question!
Thanks a lot, just what I was looking for.
Great! In that case, I will close the issue now. Feel free to reopen or create new issues if anything else is unclear.
How could I generate a suitable VAPID private / public key?
Maybe this library should also have a function to generate the keys?