Skip to content

Proposal for js-md5 Adaptation in OpenHarmony #50

@coldzonelin

Description

@coldzonelin

Background

OpenHarmony is an open-source project operated by the OpenAtom Foundation. Its aim is to build a smart terminal device operating system framework and platform for all scenarios, full connectivity, and intelligence.

OpenHarmony uses JavaScript to develop native desktop applications, particularly suitable for building lightweight, cross-device application interfaces and interaction logic. The feature of "develop once, run on multiple devices" promises to attract more JS developers, driving explosive growth in lightweight IoT applications. For teams familiar with frontend technology, OpenHarmony+JS is undoubtedly an efficient path into the all-scenario smart ecosystem.

js-md5 is a lightweight and efficient JavaScript MD5 encryption library that provides fast hash calculations for data types such as strings and files in just tens of KB, compatible with both browser and Node.js environments, making it an ideal choice for resource-sensitive scenarios. Its features align well with the lightweight and high-security needs of OpenHarmony's multi-terminal devices (such as IoT devices, wearable equipment). It has been widely used in areas like data verification, secure transmission, and sensitive information encryption. Combined with OpenHarmony's distributed capabilities, js-md5 can deepen integration into scenarios such as cross-device authentication and privacy protection, providing developers with low-power, high-consistency end-to-end security solutions.

We will submit the adaptation code via pull requests (PR) as soon as possible. Creating this issue aims to have an in-depth discussion with the community regarding the inclusion of the adaptation code. We sincerely welcome your valuable suggestions.

The first PR we hope to include installation instructions under the OpenHarmony development environment in the project README, along with hyperlinks pointing to OpenHarmony development examples, hoping to attract more frontend developers' attention to the OpenHarmony system. In subsequent use by OpenHarmony community developers, if defects are found or common new requirements are discovered, we will actively provide feedback and contribute back to the js-md5 project.

We will also continue to participate in the js-md5 community and provide technical support for using js-md5 on OpenHarmony.

Adaptation Plan

We have completed the adaptation work of js-md5 on OpenHarmony, the details are as follows:

  • Provide a demo for using js-md5 in HarmonyOS.
  • Following the OHPM (OpenHarmony Package Manager) specifications, the adapted version has been published to the OpenHarmony third-party software package center.

These adaptation measures not only retain all original functions of js-md5 but also further enhance its unique value within the OpenHarmony ecosystem.
The 0.7.3 version adapted for OpenHarmony is behind the community's 0.8.3 version, and we will promptly complete the update adaptation and testing for the new version.

Test Results

This test case is based on the OpenHarmony system and uses the original library test cases for unit testing.

Coverage of unit test cases

Interface Name Passed Remarks
md5() pass
md5.hex() pass
md5.digest() pass
md5.array() pass
md5.base64() pass

If needed, we can provide detailed test reports at any time.

Benefits to Upstream Community

  • Ability to reach OpenHarmony’s vast user base and developer community.
  • Ensuring long-term development potential by supporting cutting-edge operating system trends.
  • Enhancing the project's capability to handle diverse runtime environments.

Labels

Enhancement, Compatibility, Cross-platform

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions