flutter_crypto/lib/des/des.dart 文件里的 encrypWithEcb 方法
在这里插入图片描述
有了加密算法,只需要做一些数据转化

List desECB = DES().encrypWithEcb(password.codeUnits, key.codeUnits);
/// HEX需要引入插件,如 hex: ^0.2.0
passwordencry= HEX.encode(desECB);

在这里插入图片描述

其他模式,填充的方法在这个文件里都有,大家可以去自行修改成想要的

参考文件 flutter_crypto : https://github.com/karedem/flutter_crypto

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐