decryptApiSecret method

Future<String> decryptApiSecret(
  1. String apiHash
)

Implementation

Future<String> decryptApiSecret(String apiHash) async {
  ApiHashModel? model = await getApiModel(apiHash);
  if (model == null) {
    throw NoApiKeyFound();
  }
  String? decrypted = _encrypter.decrypt(model.apiSecretEncrypted);
  if (decrypted == null) {
    throw DecryptionException();
  }
  return decrypted;
}