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

RsaHashedKeyGenParams.hash property type #21908

Open
guillaume-fr opened this issue Oct 28, 2022 · 1 comment
Open

RsaHashedKeyGenParams.hash property type #21908

guillaume-fr opened this issue Oct 28, 2022 · 1 comment
Labels
area: Web Crypto Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!

Comments

@guillaume-fr
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/RsaHashedKeyGenParams

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

Doc says hash property is a string. Testing it with Chrome on a freshly imported CryptoKey, this property contains an object with a name property, that hash.name property is a string.
It might be confusion between the interface used to generate key and the one available in CryptoKey objet, it might also be the spec being flexible (?). Current documentation is misleading.

What did you expect to see?

Description of hash property being an object with a string-typed name property

Do you have any supporting links, references, or citations?

https://w3c.github.io/webcrypto/#dfn-RsaHashedKeyGenParams

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@github-actions github-actions bot added Content:WebAPI Web API docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 28, 2022
@sideshowbarker sideshowbarker added help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 28, 2022
@Josh-Cena
Copy link
Member

For anyone working on this: you can pass a string as hash when using it as a parameter for generateKey, but the property that's on CryptoKey.algorithm will be an object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Web Crypto Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!
3 participants