Closed

Use Swift to convert JWK to PEM

Using only Apple libraries, no third part, I need a Swift Package that can convert a JWK to PEM format.

Input will look like this:

{

"kty": "EC",

"use": "enc",

"crv": "P-256",

"kid": "enc-2020-09-20T16:23:08Z",

"x": "azICI9oN6ULaq2Tq3zl4iRg2QUbut34jTpGNN2r-ERg",

"y": "wmnLb3vFZyX66kWeYQrgyYYGMPBfplgGL4R1dVV8HWQ",

"alg": "ES256"

}

Output should be similar to this:

-----BEGIN PUBLIC KEY-----

MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE2adMrdG7aUfZH57aeKFFM01dPnkx

C18ScRb4Z6poMBgJtYlVtd9ly63URv57ZW0Ncs1LiZB7WATb3svu+1c7HQ==

-----END PUBLIC KEY-----

If you do need a crypto library I need it to by Apple's CryptoKit.

The result should be a swift package that can be used with the SwiftPM system.

I should be able to use the package in this manner:

import JWKToPEM

let input = """

{

"kty": "EC",

"use": "enc",

"crv": "P-256",

"kid": "enc-2020-09-20T16:23:08Z",

"x": "azICI9oN6ULaq2Tq3zl4iRg2QUbut34jTpGNN2r-ERg",

"y": "wmnLb3vFZyX66kWeYQrgyYYGMPBfplgGL4R1dVV8HWQ",

"alg": "ES256"

}

"""

let pemRep: String = convertJWKToPEM(input)

Skills: Swift, Cryptography

See more: use fireworks convert bmp vector, convert flv mp3 using php script, convert numbers russian using, convert 3gp mobile using ffmpeg, convert pdf word using orc, convert hex rgb using php, convert text excel using monarch, convert pdf text using php script, need convert integer stream using web service, convert swf jpeg using javascript, convert image vector using photoshop, use ffmpeg convert video flv throuh ssh, convert text html using vba, use excel convert web application, use excel convert quickbooks, convert illustrator file using publisher, convert xml csv using php, use video convert elf, convert flash jpg using php

About the Employer:
( 2 reviews ) Fullerton, United States

Project ID: #27468491

2 freelancers are bidding on average $165 for this job

kholmogorovadev

hello, I am cryptography and swift expert I can show you good result please let me know regards. Alexandra.

$180 USD in 7 days
(0 Reviews)
0.0
GintarasZelvys

Hi, Joel S. As Swift Expert, I am very interested in your project. I am very familiar with Swift and Cryptography. I have software development skills with 7+ years. My main goal is client's satisfaction and success. I More

$150 USD in 1 day
(0 Reviews)
0.0