Skip to content

jthinking/hashes-ohos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@jthinking/hashes-ohos

Hashes utils for OpenHarmony.

Install

useohpm to install package.

ohpm install @jthinking/hashes-ohos

Usage

import { util } from '@kit.ArkTS';
import { md5, blake3, sm3 } from '@jthinking/hashes-ohos';

// convert data to Uint8Array
const buf = new util.TextEncoder("utf-8").encodeInto("你好,鸿蒙!");

// md5 hex
const md5Hex = md5(buf)

// blake3 hex
const blake3Hex = blake3(buf)

// sm3 hex
const sm3Hex = sm3(buf)

// other algorithms
// ...

Supported Algorithms

  • md2
  • md4
  • md5
  • sha1
  • sha256 (sha2_256)
  • sha512 (sha2_512)
  • sha3_256
  • sha3_512
  • sm3
  • belt_hash
  • blake2s256
  • blake2b512
  • blake3
  • fsb512
  • fsb256
  • gost94
  • groestl256
  • groestl512
  • ripemd128
  • ripemd160
  • ripemd256
  • ripemd320
  • shabal192
  • shabal224
  • shabal256
  • shabal384
  • shabal512
  • streebog256
  • streebog512
  • tiger
  • tiger2
  • whirlpool

About

Hashes utils for OpenHarmony.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages