weApi function

Map<String, String> weApi(
  1. String text
)

Implementation

Map<String, String> weApi(String text) {
  //16位密钥
  Uint8List random16Key = Uint8List.fromList(List.generate(16, (int index) {
    return base62.codeUnitAt(Random().nextInt(62));
  }));
  final params =
      aesEncrypt(text: text, mode: 'cbc', key: presetKey, iv: iv, random16Key: random16Key);

  final encSecKey = rsaEncrypt(publicKeyPem, random16Key);

  return {'params': params, 'encSecKey': encSecKey};
}