该规则禁止使用不安全的DH密钥协商算法,如DH模数长度小于2048bit。
import cryptoFramework from '@ohos.security.cryptoFramework';
cryptoFramework.createKeyAgreement('DH_modp3072'); import cryptoFramework from '@ohos.security.cryptoFramework';
cryptoFramework.createKeyAgreement('DH_modp1536'); plugin:@security/recommended plugin:@security/all
Code Linter代码检查规则的配置指导请参考Code Linter代码检查(ArkTS/TS)。