decrypt static method

Future<String> decrypt({
  1. required String value,
  2. bool fAsSelf = false,
})

The CredUnprotect function (uses CredUnprotectW from wincred.h) decrypts credentials that were previously encrypted by using the CredProtect function. The credentials must have been encrypted in the same security context in which CredUnprotect is called. return string of the decrypted value.

FlutterWindowsVault.decrypt(
  // the value you want to decrypt
  value: "@@D\u0007\b\f\n\rgAAAAAYppBAAAAAAA5c5uXGQ1pJpY0VrAG-aZawRYNC3MboXJ",
  // fAsSelf: (this works only if encrypted is true) Set to TRUE to specify that the credentials are encrypted in the security context of the current process.
  // Set to FALSE to specify that credentials are encrypted in the security context of the calling thread security context.
  // default value is false.
  fAsSelf: false,
);

Implementation

static Future<String> decrypt({
  required String value,
  bool fAsSelf = false,
}) {
  assert(value.isNotEmpty);
  // assert(fAsSelf != null);
  return _channel.invokeMethod<String>('decrypte',
      {'value': value, 'fAsSelf': fAsSelf}).then((value) => value!);
}