harmony 鸿蒙Protecting Asset Data

  • 2025-06-12
  • 浏览 (6)

Protecting Asset Data

NOTE

The asset data mentioned in this topic refers to sensitive data less than 1024 bytes in size, including passwords, app tokens, and other critical data (such as bank card numbers).

When to Use

Asset store service (ASSET) is used in the logins of the users who select Remember password on the login page. The application/browser stores the user passwords in an asset store, which ensures the password security.

When a user opens the login page again, the application/browser obtains the user password from the asset store and automatically fills the password in the Password text box. The user only needs to tap the Log In button to complete the login.

Development Process

The following figure illustrates the development process for the passwords (assets) protected.

  1. The service queries an asset and determines whether the asset exists in the asset store based on the query result.

For details about the development procedure, see Querying Assets (ArkTS)/Querying Assets (C/C++). For details about the sample code, see Querying Attributes of an Asset (ArkTS)/Querying Attributes of an Asset (C/C++). 2. If the asset does not exist, add an asset. For details, see Adding an Asset (ArkTS)/Adding an Asset (C/C++).

  1. If the asset exists, the service can perform any of the following operations based on service requirements:

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Asset Store Kit (Asset Store Service)

harmony 鸿蒙Performing Asset Operations in Specified User Space (for System Applications Only)

harmony 鸿蒙Adding an Asset (ArkTS)

harmony 鸿蒙Managing Assets in a Group

harmony 鸿蒙Querying an Asset with User Authentication (ArkTS)

harmony 鸿蒙Querying Assets (ArkTS)

harmony 鸿蒙Removing Assets (ArkTS)

harmony 鸿蒙Updating an Asset (ArkTS)

harmony 鸿蒙Adding an Asset (C/C++)

harmony 鸿蒙Managing Assets in a Group

0  赞