Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/esafe 298 add rsa signing to cryppo #2

Closed

Conversation

GenteiJanken
Copy link

This is intended to mirror changes to the Ruby Cryppo gem, providing a facility to sign and verify messages with an RSA keypair, as well as serialize a signature and corresponding data for transport to the keystore microservice.

Copy link
Contributor

@zbarbuto zbarbuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files need reformatting with prettier.

const signature = key.sign(mdDigest);
return {
signature: signature,
data: data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use shorthands for these

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GenteiJanken
return {
signature,
data

const signed = decomposedPayload[0]
const signingStrategy = decomposedPayload[1]
const encodedSignature = decomposedPayload[2]
const encodedData = decomposedPayload[3]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use array destructuring for these.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[signed, signingStrategy, encodedSignature, encodedData] = decomposedPayload

@zbarbuto zbarbuto closed this Jun 11, 2020
@zbarbuto zbarbuto deleted the feature/ESAFE-298_add_rsa_signing_to_cryppo branch June 11, 2020 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants