googlearchive / web-push-encryption

[Deprecated] Encryption Utilities for Web Push protocol
Apache License 2.0
84 stars 23 forks source link

Throw errors for incorrectly encoded keys #21

Closed owencm closed 7 years ago

owencm commented 8 years ago

We should ensure to throw an error if the keys are provided in the wrong encoding or type, e.g. a string instead of a buffer, non-URL-safe Base64 etc.

gauntface commented 8 years ago

@owencm was there a particular example where you hit this?

We have some tests on bad input set up, but sounds like we are missing something.