blob: e46889a027b981d2b6ab32261a1a3f4f7f19b027 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="../resources/common.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("Test digest with SHA-512");
jsTestIsAsync = true;
var message = asciiToUint8Array("Hello, World!");
var expectedDigest = "374d794a95cdcfd8b35993185fef9ba368f160d8daf432d08ba9f1ed1e5abe6cc69291e0fa2fe0006a52570ef18c19def4e617c33ce52ef0a6e5fbe318cb0387";
crypto.subtle.digest("sha-512", message).then(function(result){
digest = result;
shouldBe("bytesToHexString(digest)", "expectedDigest");
finishJSTest();
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>