openharmony 鸿蒙 crypto-generate-message-digest-overview

2025-06-12 浏览 (1)

MD Overview and Algorithm Specifications

The message digest (MD) algorithm allows a fixed-length digest to be generated from data of arbitrary size by using the hash algorithm. The MD algorithm is also referred to as a hash algorithm or a one-way hash algorithm.

When the same digest algorithm is used, the generated digest (hash value) has the following features:

  • The same message always results in the same hash value.

  • The digest generated is of the fixed length no matter the length of messages. (The digest length is determined by the algorithm used). For example, SHA-256 generates a digest of 256 bits (32 bytes).

Supported Algorithms and Specifications

The Supported Type column in the following table lists the algorithm to be used when an Md instance is created.

MD AlgorithmSupported TypeLength (Bytes)API Version
HASHSHA1209+
HASHSHA224289+
HASHSHA256329+
HASHSHA384489+
HASHSHA512649+
HASHMD5169+
HASHSM33210+

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Crypto Architecture Kit

harmony 鸿蒙Encryption and Decryption with a 3DES Symmetric Key (ECB Mode) (C/C++)

harmony 鸿蒙Encryption and Decryption with a 3DES Symmetric Key (ECB Mode) (ArkTS)

harmony 鸿蒙Encryption and Decryption with an AES Symmetric Key (CBC Mode) (C/C++)

harmony 鸿蒙Encryption and Decryption with an AES Symmetric Key (CBC Mode) (ArkTS)

harmony 鸿蒙Encryption and Decryption with an AES Symmetric Key (CCM Mode) (C/C++)

harmony 鸿蒙Encryption and Decryption with an AES Symmetric Key (CCM Mode) (ArkTS)

harmony 鸿蒙Encryption and Decryption with an AES Symmetric Key (ECB Mode) (C/C++)

harmony 鸿蒙Encryption and Decryption with an AES Symmetric Key (ECB Mode) (ArkTS)

harmony 鸿蒙Encryption and Decryption by Segment with an AES Symmetric Key (GCM Mode) (C/C++)

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/zXRTdw