Crate codedefender_api

Crate codedefender_api 

Source
Expand description

High-level client interface for interacting with the CodeDefender SaaS API.

This module provides functions to upload files, analyze binaries, initiate obfuscation, and poll for obfuscation results via blocking HTTP requests.

All endpoints require a valid API key, passed via the Authorization header using the ApiKey scheme.

Re-exports§

pub use codedefender_config;
pub use serde_json;

Enums§

Status

Statics§

ANALYZE_EP
ANALYZE_STATUS_EP
BASE_URL
Changing the BASE_URL env variable allows you to specify a different backend like staging or local.
DEFEND_EP
DOWNLOAD_EP
GET_UPLOAD_URL_EP

Functions§

defend
Starts the obfuscation process for a given file using the provided configuration.
download
Polls the obfuscation status.
download_analysis_result
Downloads and deserializes the analysis result from the presigned URL.
download_obfuscated_file
Downloads the obfuscated file from the presigned URL.
get_analyze_status
Polls the analysis status.
get_upload_info
Gets the presigned upload URL and file ID for uploading a file.
start_analyze
Starts analysis of a previously uploaded binary file and optionally its PDB file.
upload_data
Uploads raw data bytes to CodeDefender with a specific filename and returns the file ID.
upload_file
Uploads a binary file to CodeDefender and returns a UUID representing the uploaded file.
upload_to_s3
Uploads file bytes to the presigned S3 URL.