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

Add Crypto HmacSha256 support #696

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Commits on Jul 15, 2024

  1. Add crypto hmac-sha256

    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    d61a7fa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    da1aa50 View commit details
    Browse the repository at this point in the history
  3. Address linting feedback

    HmacSha256::new_from_slice(&js_string_secret.as_bytes()) =>
     HmacSha256::new_from_slice(js_string_secret.as_bytes())
    
     No need to pass in address here.
    
     Same for js_string_message.
    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    56b9caa View commit details
    Browse the repository at this point in the history
  4. Switch from cryptox to crypto namespace

    Also drop javy_ prefix in anticipation of switching to winter cg.
    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    59dd9dc View commit details
    Browse the repository at this point in the history
  5. Apply linting changes

    Ran `cargo fmt -- --check`, and applied suggestions, per ci feedback.
    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    b804d6c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    befd757 View commit details
    Browse the repository at this point in the history
  7. Code compiles, crashing running the method

    No clear reason on why it fails
    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    4c1357f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b59ac8e View commit details
    Browse the repository at this point in the history
  9. Hmac works basically

    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    9807751 View commit details
    Browse the repository at this point in the history
  10. Add update method

    Replace read/write message field with update field to match nodejs
    crypto api.
    
    Add tests for failure conditions.
    
    Clean up string error handling in digest method.
    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    b779483 View commit details
    Browse the repository at this point in the history
  11. Code cleanup

    - addess lint warnings
    - renamed variables for clarity
    - improved method names for clarity
    - clarified fn definition comments
    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    158a70d View commit details
    Browse the repository at this point in the history
  12. Disable crypto by default

    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    b320eec View commit details
    Browse the repository at this point in the history
  13. Improve testing

    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    7aa8757 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    381a387 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    318342b View commit details
    Browse the repository at this point in the history
  16. Switch to wpt style invoacation

    Partial implementation, including:
    - crypto.subtle.sign method
    - setup wpt testing infra
    
    Missing:
    - validation of sign protocol (hmac and sha256)
    - add verify method
    - return value promise to match API format
    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    2d873c2 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    970af05 View commit details
    Browse the repository at this point in the history
  18. WIP - progress on promise

    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    3a732a7 View commit details
    Browse the repository at this point in the history
  19. Improve cargo feature handling and crypto APIs definition

    This commit improves the `crypto` feature handling by making the
    relationship between crypto and the experimental_event_loop explicit. If
    `crypto` is defined, the `experimental_event_loop` feature will also be
    enbabled.
    
    Additionally, this commit makes it easier to define the async crypto
    APIs by introducing a `crypto.js` file that defines JS bits to make it
    easier to return a promise.
    saulecabrera authored and ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    eb6d86c View commit details
    Browse the repository at this point in the history
  20. Add crypto to test-javy make task

    This allows the crypto tests to run
    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    399dd95 View commit details
    Browse the repository at this point in the history
  21. Get tests working again

    ewalk153 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    b123c25 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. Configuration menu
    Copy the full SHA
    b667f96 View commit details
    Browse the repository at this point in the history