Færdiggjort

Create RS256 JWT token in Objective-C using a string of a private key

Provide a function, that is written in Objective-C, that has one String input of a private key and returns a String of a RS256 signed JWT token signature.

I have provided the string of the private key (as is), the payload/claim and the valid JWT token as a reference.

String of the private key:

"-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAtN7LQq7l9a9lqd6U4+VoZtnCoOVOnHH9o7SK8Vl5oIIG/SPh\ns6BgprPLfFhrtmkI5UYJbkBA3mxIVMZnfD0l+6hYMFrPZo2ulG/p1FXdI/Ys/m8b\nFy3sKpxgbwuevhc/6e5ZU6BiBuieFcMrtSmO87+8XbWDWDGE0WqkRJ76drDrQ/tL\n+XdTYPwqa4nUHsLelrgyIz01ddgIdn4qRIzPpuz8ldICk/ZahxtfEV/BzKy+RjyX\nPITAE4L+QA4Ze1iCaljRkxI+aUQPja+KHZ8MdQ2Vnv4zoZ5ILpkMzCPgRSNwQ19a\nUOv6FllGI+XGhnNGMl2CKC9aNslg4ot9b0SYxQIDAQABAoIBAGX0CENobzvUSMw+\nKVNlJzqCmVE0sOFC6CR1SrTNKOAvK11Z8oncZ17Qjm1jMiQ6hMcoeXxqP6ahBwyy\nYfcISPbYaA2pwqseRkBp7TbBx8vTon0xh+XC/xLt3vX5aNviIybsMfIPv/IBActm\nnqaZ7Hi9paJ1BLqb/zBEmqALtUdddC30VRz2hO82c3JbSqvIDj/p7pAryDJPOiss\nPu5Co3uM1PN92EqNRM0w3Z/VvwLrymULzLo01h7DyJu0h1lX4f6BBNjRrLmLUYWg\np2VDdtx7j28e8T0nFAwuUVgxmbScv47Py/c7oUz24nBKg2vtmqXBRBugTG41f1Iw\nHArSaKkCgYEA3ag9vzw/2rK8mo5e7gV/TVZ2CEqf+Bckcv8dQPMA0wGyqTrf4prK\niQrYanxmt3c1N+Od7mUQjZa6YWQSZbA4rOsZvLW+CZ09sr+Et1PfHrPsigp5xOiM\nhvyNZIkalQVn73Wcal3ylKWWzFRH5Mc8b9rdPoM9w5keNHM32rX9Hf8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JUuxvNJIdcL0KG5Ue-JJEqUXTbL1YEiH6Ir6rQa-5qeX9AEXpDz54opz5DrJdvxmWlt1naSh8ZkFUv2krND1N74GNg04Eoiah621rwVA64IKpqXihq7BXAURzv6O9PmNzE7FKidEPztFuX-BZNJZBsowhQU07tw

The project is successfully completed when the JWT token has been validated against the attached private and public key content.

Do do so this site has to be used for validation:
https://jwt.io/

Steps to reproduce:
- Set algorithm to RS256
- Copy the plain text content of the attached private.key and paste it into the "Private Key" input field
- Copy the plain text content of the attached public.key and paste it into the "Public Key" input field
- Copy generated JWT token into the "Encoded" input field
- The payload should be the same as {"client_id": "351c36f108e78fad", "iat": 1538050051}
- The token should verify by displaying a blue "Signature Verified"

Evner: iOS Development, Objective C

Se mere: create xml type table sql server using vbnet, create fillable web form can printed using html, create check php token url, create excel report several oracle databases using java, create website assist selling items ebay using wordpress, create image viewer application objective, create photo filter iphone objective, create jigsaw puzzle image objective, using net private key java, objective encrypt decrypt string, objective rsa encrypt string public key, create employee exception class whose constructor receives string, jwt token classic asp, javascript jwt token, create program encrypt decrypt binary files using des, birmingham alabama objective c free lance developer, game developing using objective c

Om arbejdsgiveren:
( 10 bedømmelser ) Elwood, Australia

Projekt ID: #17851583

Tildelt til:

gouravvemula

I did similar kind of projects of generating JWT token .With my experience i can easily help you out

$222 AUD in 4 dage
(0 bedømmelser)
0.0

2 freelancere byder i gennemsnit $389 på dette job

ArkssTech

Hi , It’s great to meet you. we will make the ERC20,ERC721 and ETH based Token in one day. ping me up so that we can discuss it more. We develop: cutting-edge software for Blockchain, ERC721, ERC20 Token Deve Flere

$555 AUD in 3 dage
(0 bedømmelser)
0.0