Skip to content

Conversation

@mseddon
Copy link
Contributor

@mseddon mseddon commented Jun 5, 2015

Copy link
Member

Choose a reason for hiding this comment

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

Add blank lines between members.

@mseddon mseddon force-pushed the webcrypto-api branch 2 times, most recently from 5458cab to 118372b Compare June 5, 2015 08:54
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to put this in org.scalajs.dom.crypto instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I strongly agree. org.scalajs.dom.raw is rather cluttered. I'm unsure why pretty much everything is defined in here.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is needed. I would encourage people to use org.scalajs.dom.crypto.crypto instead of org.scalajs.dom.window.crypto.

@mseddon mseddon force-pushed the webcrypto-api branch 3 times, most recently from 7afe44e to 6e7d65e Compare June 5, 2015 11:40
@mseddon
Copy link
Contributor Author

mseddon commented Jun 5, 2015

Okay, I figured out my bizarre crash- the Window.crypto member in dom (when I previously mixed GlobalCrypto into Window) was conflicting with my crypto package object, and the compiler wasn't handling it particularly well. That should be the lot, hopefully! All operations now happen through crypto.crypto as suggested.

@mseddon mseddon force-pushed the webcrypto-api branch 2 times, most recently from b7c9ceb to a1519e5 Compare June 5, 2015 19:04
@mseddon
Copy link
Contributor Author

mseddon commented Jun 5, 2015

Whoops, forgot to remove those spurious Algorithm parameter overloads on the Crypto object.

Copy link
Member

Choose a reason for hiding this comment

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

Ah ah now you have the worst both worlds: modulusLength of type Long, and not .toDouble. You need either of those. As I told earlier, I would advocate declaring modulusLength as a Double.

Possibly with an overload taking a Long and calling the Double version with .toDouble.

@sjrd
Copy link
Member

sjrd commented Jun 5, 2015

That's all.

@mseddon
Copy link
Contributor Author

mseddon commented Jun 6, 2015

Thanks again for your patience :) It's been nearly a year since I did any serious commits, so I'm a little rusty.

@sjrd
Copy link
Member

sjrd commented Jun 6, 2015

LGTM

sjrd added a commit that referenced this pull request Jun 6, 2015
Implement Web Cryptography API
@sjrd sjrd merged commit 9bab960 into scala-js:master Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants