haikuwebkit/LayoutTests/crypto/subtle/sha256-digest-expected.txt

11 lines
207 B
Plaintext
Raw Permalink Normal View History

Update SubtleCrypto::digest to match the latest spec https://bugs.webkit.org/show_bug.cgi?id=164742 <rdar://problem/29258037> Reviewed by Darin Adler. LayoutTests/imported/w3c: * WebCryptoAPI/digest/test_digest-expected.txt: * WebCryptoAPI/idlharness-expected.txt: Source/WebCore: This patch updates the SubtleCrypto::digest method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-digest. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-digest. Currently supported digest algorithms are SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512. Tests: crypto/subtle/digest-malformed-parameters.html crypto/subtle/sha1-digest.html crypto/subtle/sha224-digest.html crypto/subtle/sha256-digest.html crypto/subtle/sha384-digest.html crypto/subtle/sha512-digest.html crypto/workers/subtle/sha1-digest.html crypto/workers/subtle/sha224-digest.html crypto/workers/subtle/sha256-digest.html crypto/workers/subtle/sha384-digest.html crypto/workers/subtle/sha512-digest.html * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::jsSubtleCryptoFunctionDigestPromise): (WebCore::JSSubtleCrypto::digest): * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::digest): * crypto/CryptoAlgorithm.h: * crypto/SubtleCrypto.idl: * crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::digest): * crypto/algorithms/CryptoAlgorithmSHA1.h: * crypto/algorithms/CryptoAlgorithmSHA224.cpp: (WebCore::CryptoAlgorithmSHA224::digest): * crypto/algorithms/CryptoAlgorithmSHA224.h: * crypto/algorithms/CryptoAlgorithmSHA256.cpp: (WebCore::CryptoAlgorithmSHA256::digest): * crypto/algorithms/CryptoAlgorithmSHA256.h: * crypto/algorithms/CryptoAlgorithmSHA384.cpp: (WebCore::CryptoAlgorithmSHA384::digest): * crypto/algorithms/CryptoAlgorithmSHA384.h: * crypto/algorithms/CryptoAlgorithmSHA512.cpp: (WebCore::CryptoAlgorithmSHA512::digest): * crypto/algorithms/CryptoAlgorithmSHA512.h: LayoutTests: * crypto/subtle/digest-malformed-parameters-expected.txt: Added. * crypto/subtle/digest-malformed-parameters.html: Added. * crypto/subtle/sha1-digest-expected.txt: Added. * crypto/subtle/sha1-digest.html: Added. * crypto/subtle/sha224-digest-expected.txt: Added. * crypto/subtle/sha224-digest.html: Added. * crypto/subtle/sha256-digest-expected.txt: Added. * crypto/subtle/sha256-digest.html: Added. * crypto/subtle/sha384-digest-expected.txt: Added. * crypto/subtle/sha384-digest.html: Added. * crypto/subtle/sha512-digest-expected.txt: Added. * crypto/subtle/sha512-digest.html: Added. * crypto/workers/subtle/resources/sha1-digest.js: Added. * crypto/workers/subtle/resources/sha224-digest.js: Added. * crypto/workers/subtle/resources/sha256-digest.js: Added. * crypto/workers/subtle/resources/sha384-digest.js: Added. * crypto/workers/subtle/resources/sha512-digest.js: Added. * crypto/workers/subtle/sha1-digest-expected.txt: Added. * crypto/workers/subtle/sha1-digest.html: Added. * crypto/workers/subtle/sha224-digest-expected.txt: Added. * crypto/workers/subtle/sha224-digest.html: Added. * crypto/workers/subtle/sha256-digest-expected.txt: Added. * crypto/workers/subtle/sha256-digest.html: Added. * crypto/workers/subtle/sha384-digest-expected.txt: Added. * crypto/workers/subtle/sha384-digest.html: Added. * crypto/workers/subtle/sha512-digest-expected.txt: Added. * crypto/workers/subtle/sha512-digest.html: Added. Canonical link: https://commits.webkit.org/182850@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-01 00:28:04 +00:00
Test digest with SHA-256
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS bytesToHexString(digest) is expectedDigest
PASS successfullyParsed is true
TEST COMPLETE