Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

326
Vistas
How can I generate an RSA key pair in Swift on Linux?

I know that when using Swift on iOS or macOS you can use SecKeyGeneratePair, but the Security library is unavailable on Linux. Short of falling back on Process to use the the OpenSSL CLI interface, is there any way to generate an RSA key pair in Swift.

FYI, I'm using Vapor 3 to build a web API.

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You can use the cross-platform library Themis (Apache 2) + example Swift wrappers. The nice thing is that you can use the same API regardless of programming language or location (back/front).

You can generate both RSA & EC keys. Tested on Vapor + Ubuntu 16.04

over 4 years ago · Santiago Trujillo Denunciar

0

So this is many months later, but I thought I would at least update for any others. While I looked into Andrei's suggestion above to use Themis, in the end it really was simplest to simply use Process that I was avoiding originally.

I had to call some local scripts anyway, so I wrote a dead simple Shell class that wrapped Swift's Process. It's not multithreaded, so it's not great for performance. But it works for what I need. I just called OpenSSL's CLI and grabbed the output.

Shell Gist: https://gist.github.com/mattmaddux/9979ec992c2b9744b669bd1728c28c19

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda