decrypt static method

dynamic decrypt(
  1. String encrypted
)

the value of encrypted made with encrypt. Throws DecryptException when it is not valid, or the text in it is not JSON (it was made with encryptString).

Implementation

static dynamic decrypt(String encrypted) {
  String text = decryptString(encrypted);
  try {
    return jsonDecode(text);
  } on FormatException {
    throw DecryptException();
  }
}