https://github.com/honwhy/sm4-sdk
sm4-sdk for keeping the key inside the wasm.
https://github.com/honwhy/sm4-sdk
Last synced: 4 months ago
JSON representation
sm4-sdk for keeping the key inside the wasm.
- Host: GitHub
- URL: https://github.com/honwhy/sm4-sdk
- Owner: honwhy
- License: mit
- Created: 2024-09-09T15:03:22.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-01T13:55:21.000Z (over 1 year ago)
- Last Synced: 2025-06-13T23:34:33.103Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 14.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE_MIT
Awesome Lists containing this project
README

sm4-sdk
sm4-sdk for keeping the key inside the wasm.
Built with 🦀🕸 by The Rust and WebAssembly Working Group
## 🚴 Usage
### 🐑 Get releases from this project and use in your project
### 🛠️ Clone this project and build with `wasm-pack build`
```
git clone https://github.com/honwhy/sm4-sdk.git
wasm-pack build --target web
```
for windows, set default host to `x86_64-pc-windows-msvc` which may save you some time.
### 🔬 Test in Headless Browsers with `wasm-pack test`
```
wasm-pack test --firefox
# or
wasm-pack test --headless --chrome
```
### 🔥 Run demo html with wasm
```
python -m http.server 8080
```
open `http://localhost:8000/example.html` in your browser.
### 🎁 Publish to NPM with `wasm-pack publish`
```
wasm-pack publish
```
## 🔋 Batteries Included
* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
between WebAssembly and JavaScript.
* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
for logging panic messages to the developer console.
## 🫛 Insider
this sm4-sdk use SM4 algorithm with PKCS5Padding padding mode.
## License
Licensed under [LICENSE-MIT]( http://opensource.org/licenses/MIT)