Skip to content

yin1999/wasm-sha1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wasm-sha1

A WebAssembly sha1 digest lib.

usage

The browser should support ES module.

<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
</head>

<body>
	<!-- enable ES module -->
	<script type="module"> 
		import init, { Sha1Digest } from '//cdn.jsdelivr.net/gh/yin1999/wasm-sha1@release/sha1_wasm.js'
		init()
			.then(() => {
				const hash = new Sha1Digest()
				const enc = new TextEncoder()
				const data = enc.encode("hello world")
				hash.update(data)

				console.log(`sha1 digest: ${hash.finalize()}`)
			})
	</script>
</body>

</html>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages