Menu ▾ ▴

API Reference

RedoSan

API Reference

CLI Commands Reference

The CLI is built with Commander.js v14 and provides 14 commands plus a global safety flag.

Usage: redosan [options] [command]

Options:
  -V, --version                              output the version number
  --allow-dangerous                          Skip file validation (allow blocked extensions, bypass magic bytes check)
  -h, --help                                 display help for command

The package is prepared as redosan-authenticity-cli (v2.0.0) but is not yet published to npm — install from source (npm install && npm link). Note: redosan --version currently prints 1.0.0 (hardcoded in cli/index.js:16) while package.json is 2.0.0.

There is no redosan menu and no redosan id-forge subcommand: use node cli/menu.js for the interactive menu and node cli/lib/id_forge.js <type> [count|file] [--json|--csv] for ID generation.


redosan fingerprint

Compute cryptographic and perceptual hashes of files.

Usage: redosan fingerprint [options] <file>

Arguments:
  file                 Path to the file to fingerprint

Options:
  -a, --algo <type>    Specific algorithm: sha1, sha256, sha384, sha512, sha3,
                       blake2b, blake3, md5, ripemd160, whirlpool, all (default)
  -j, --json           Output as JSON
  -o, --output <file>  Save results to a file
  -h, --help           display help for command

Algorithms (21 total):

  • Cryptographic (17): SHA-1, SHA-256, SHA-384, SHA-512, SHA-224, SHA-3 family (224/256/384/512), BLAKE2b, BLAKE2s, BLAKE3, MD2, MD4, MD5, RIPEMD-160, Whirlpool (the algoMap in cli/commands/fingerprint.js also accepts blake2s, sha224, md2, md4)
  • Perceptual (4): pHash, aHash, dHash, wHash — computed automatically for image inputs (wired into the CLI in v2.0.0)

redosan metadata

Extract EXIF, XMP, IPTC, and PNG chunk metadata from image files.

Usage: redosan metadata [options] <file>

Arguments:
  file                 Path to the image file

Options:
  -j, --json           Output as JSON
  -o, --output <file>  Save results to a file
  -h, --help           display help for command

Output fields: fileStats, exif, xmp, iptc, pngChunks, gps (parsed GPS coordinates in decimal degrees).


redosan watermark

Embed and extract invisible watermarks using 9 core algorithms.

Usage: redosan watermark [options] [command]

Commands:
  embed [options]    Embed a watermark into an image
  extract [options]  Extract a watermark from an image

watermark embed options:

  -i, --image <file>     Cover image
  -s, --secret <file>    Secret file to embed
  -o, --output <file>    Output image path
  -p, --password <pass>  Password
  -a, --algo <type>      Algorithm (default: lsb)

watermark extract options:

  -i, --image <file>     Watermarked image
  -o, --output <file>    Extracted data output path
  -p, --password <pass>  Password
  -a, --algo <type>      Algorithm (default: lsb)

Algorithm Reference (9 Core):

# Name Domain Description
1 Spatial LSB Spatial 3 bits/pixel in R, G, B
2 Frequency DCT Frequency Coefficient pair comparison (c[5,2] vs c[4,3]), K=15, 3x redundancy
3 Neural SS Spatial Seeded-shuffle order embedding
4 Latent DCT Frequency 3x redundant DCT embedding, strength=30
5 Zero-bit Detection Fixed signature "RedoSanZeroBit" (presence only)
6 Multi-bit Spatial 2 bits/channel, 6 bits/pixel
7 Forensic Frequency DCT mid-frequency, strength=20
8 Fragile Spatial SHA-256 hash (512 bits), tamper-evident
9 Imatag-style Frequency Dual-channel Y (K=15) + Cb (K=10)

Types 2/4/5/7/9 share the DCT path (embedInDCT/extractFromDCT in Watermark/watermark.js); types 1/3/6/8 have dedicated wm1_/wm3_/wm6_/wm8_ implementations in Watermark/watermark_core.js. Password is required for all types except 5 and 8.


redosan audio-watermark

Embed and extract watermarks in WAV audio files using 8 algorithms.

Usage: redosan audio-watermark [options] <action> <file>

Arguments:
  action                 Action: embed, extract
  file                   Path to audio file (WAV)

Options:
  -s, --secret <file>    Secret file to embed (embed only)
  -o, --output <file>    Output file path
  -p, --password <pass>  Password
  -a, --algo <type>      Algorithm: lsb, phase_coding, echo_hiding, dsss, qim,
                         dwt, patchwork, dct (default: lsb)
  -j, --json             Output as JSON (extract only)
  -h, --help             display help for command

Algorithm Details:

Algorithm Domain Robustness Capacity
LSB Temporal Low High (~12.5% of samples)
Phase Coding Frequency Medium Low
Echo Hiding Temporal Medium Medium
DSSS Spread Spectrum High Low
QIM Quantization Medium Medium
DWT Haar Wavelet Medium Medium
Patchwork Statistical Medium Low
DCT Frequency Medium Medium

redosan pixel-injection

Advanced pixel-level data injection using 23 algorithms in 4 categories.

Usage: redosan pixel-injection [options] <action>

Arguments:
  action                 Action: embed, extract

Options:
  -i, --image <file>     Input image
  -s, --secret <file>    Secret file to embed
  -o, --output <file>    Output file path (omit to print to screen for extract)
  -p, --password <pass>  Password
  -a, --algo <type>      Algorithm: enhanced_lsb, adaptive_lsb,
                         multi_channel_lsb, random_lsb, dct, dwt, dft,
                         hybrid_dct_dwt, vine, pixel_seal, nullguard,
                         shallow_diffuse, diffusion_based, imagewmark,
                         meta_seal, stardustmark, invisimark, elevenlikes
  -h, --help             display help for command

Algorithm Categories (23 total — 18 embedding + 5 analysis modes):

Category Algorithms
Spatial (4) enhanced_lsb, adaptive_lsb, multi_channel_lsb, random_lsb
Frequency (4) dct, dwt, dft, hybrid_dct_dwt
Deep Learning (5) vine, pixel_seal, nullguard, shallow_diffuse, diffusion_based
Professional (5) imagewmark, meta_seal, stardustmark, invisimark, elevenlikes

Analysis modes (5): statistical detection, ML detection, blind decoding, robustness testing, quality metrics (PSNR, SSIM, LPIPS). The UI's Auto Detect mode tries them all in turn.

Extraction falls back to blind decoding (core.detection.blind_decoding) when the exact algorithm is unknown.


redosan timestamp

Create and verify OpenTimestamps proofs.

Usage: redosan timestamp [options] <action> <file>

Arguments:
  action               Action: create or verify
  file                 Path to the file

Options:
  -o, --output <file>  Output .ots file (create) or .ots proof file (verify)
  -f, --file2 <file>   Original file (verify mode)
  -h, --help           display help for command

Upgrading an incomplete proof is a separate command:

Usage: redosan upgrade [options] <file>

Arguments:
  file                 Path to .ots proof file

Options:
  -o, --output <file>  Output file path
  -h, --help           display help for command

redosan c2pa

Sign, read, and verify C2PA Content Credentials manifests.

Usage: redosan c2pa [options] <action> <file>

Arguments:
  action               Action: sign, read, verify
  file                 Path to the file

Options:
  -o, --output <file>  Output file path
  --claim <text>       Claim (e.g. "Created by XYZ")
  --title <text>       Content title
  --author <text>      Author name
  -h, --help           display help for command

Format support:

  • JPEG: C2PA manifest stored in APP11 marker (0xFF 0xEB)
  • PNG: C2PA manifest stored in c2pa chunk inserted before IDAT chunk
  • Signing uses ECDSA P-256 / ES256 (COSE Sign1 over CBOR)

redosan forensic

Analyze image tamper signals using forensic techniques.

Usage: redosan forensic [options] <file>

Arguments:
  file                   Image file to analyze

Options:
  -j, --json             Output as JSON
  -o, --output <file>    Save results to a file
  -h, --help             display help for command

Analysis techniques:

  • Error Level Analysis (ELA): Detects regions with different compression levels
  • Noise Inconsistency: Detects areas with abnormal noise patterns
  • JPEG Structure Analysis: Quantization tables, DCT coefficients, marker order
  • Copy-Move Detection: Detects cloned image regions
  • Metadata Anomalies: Flags missing or inconsistent EXIF data

redosan did

Generate DID keypairs and sign file fingerprints.

Usage: redosan did [options] <action> [file]

Arguments:
  action                 Action: generate, sign
  file                   File to sign (sign mode)

Options:
  --algo <type>          Key algorithm: Ed25519, P-256 (generate mode)
  -o, --output <file>    Output path
  -h, --help             display help for command

Key types:

  • Ed25519: 32-byte private key, 32-byte public key
  • P-256 (ECDSA): 32-byte private key, 65-byte uncompressed public key
  • RSA-2048 / RSA-4096: accepted by the implementation (the error message lists Ed25519, P-256, RSA-2048, or RSA-4096) even though --help only mentions the first two

Output includes a did:key: identifier, key material in JWK format, and a DID document.


redosan certificate

Generate Digital Passport certificates with full provenance chain.

Usage: redosan certificate [options] <file>

Arguments:
  file                      Image file to certify (or fingerprint JSON)

Options:
  -o, --output <file>       Output file path
  --format <type>           Output format: pdf, docx, epub (default: pdf)
  --name <text>             Owner name
  --email <text>            Owner email
  --phone-code <text>       Country code (e.g., +1)
  --phone <text>            Phone number
  --website <url>           Website URL
  --social-tiktok <url>     TikTok URL
  --social-facebook <url>   Facebook URL
  --social-instagram <url>  Instagram URL
  --social-youtube <url>    YouTube URL
  --music-spotify <url>     Spotify URL
  --music-applemusic <url>  Apple Music URL
  --music-ytmusic <url>     YouTube Music URL
  --music-soundcloud <url>  SoundCloud URL
  --watermark <file>        Watermark result file
  --pixel-injection <file>  Pixel injection result file
  --fingerprint <file>      Fingerprint JSON file
  --did <file>              DID identity JSON file
  --timestamp <file>        Timestamp .ots file
  -h, --help                display help for command

Certificate includes: QR verification code, file fingerprints, timestamps, watermark data, DID signature, and user identity — in PDF, DOCX, or EPUB format.


redosan document-watermark

Embed and extract invisible watermarks in text documents.

Usage: redosan document-watermark [options] <action>

Arguments:
  action                 Action: embed, extract

Options:
  -i, --input <file>     Input text file
  -s, --secret <file>    Secret message file (embed mode)
  -m, --message <text>   Secret message text (embed mode)
  -o, --output <file>    Output file path
  -p, --password <pass>  Password
  -a, --algo <type>      Algorithm: 1=ZWC, 2=Homoglyph, 3=Whitespace, 0=Auto
                         (default: 1)
  -h, --help             display help for command

Techniques:

# Technique Description
1 ZWC Zero-Width Character embedding (invisible Unicode characters)
2 Homoglyph Character substitution with visually identical Unicode variants
3 Whitespace Whitespace manipulation (trailing spaces, tab variants)
0 Auto Auto-detect the technique used in an extracted document

Browser-side DOCX/PDF export additionally supports line-shift and word-shift watermarking (5 techniques total in the UI).


redosan converter

Convert image and audio files between formats.

Usage: redosan converter [options] <file>

Arguments:
  file                   Input file path

Options:
  -f, --format <type>    Target format (png, jpg, webp, mp3, etc.)
  -o, --output <file>    Output file path
  -h, --help             display help for command

Falls back to a file copy with a warning when no conversion library is available (image/audio conversion uses optional tooling; the browser converter uses FFmpeg.wasm).


redosan tools

Usage: redosan tools [options]

Check availability of external tools (exiftool, sox, ImageMagick, etc.)

Browser JavaScript Module Reference

All browser scripts begin with the domain-origin self-check IIFE described in [Security]; they throw on untrusted origins. Handlers below are globals unless noted.

Style/shared.js — Common Utilities

Function Description
escHtml(str) Escape HTML special characters (<, >, &, ", ')
downloadBlob(blob, filename, attrSafe) Download blob as file; revokes the previous object URL
downloadBlobSimple(blob, filename) Simplified blob download
unpack32(b) / pack32(v) Unsigned 32-bit read/write (>>> 0)
getFile(id) / getVal(id) Get file / value from an element
setStatus(id, msg, type) Set element status text
showResult(id, content) / setOutput(id, content) / setText(id, text) Render output (output path is escHtml()-wrapped)
spinner(show) Show/hide loading spinner
loadImage(url) / canvasToBlob(canvas, type, quality) Image helpers
getRGB(ctx, x, y) Get RGBA values at a pixel
sha256Hex(data) SHA-256 hex digest via WebCrypto
setTheme / toggleTheme / initTheme Theme management
initDropZones() / attachDropZoneEvents() Drag-and-drop upload zones
checkAutomation() / showBotOverlay() Automation detection + warning overlay
detectWebRTCIPs() / startAsyncVPNDetection() / logSecurityStatus() VPN/proxy awareness
setResult / getResult / clearResult / setDownloadHandler / getDownloadHandler Result + download registry
isInAppBrowser() / goHome() Environment helpers
window.RedoSanLoadRemovalTools Loads Removal_Tools/removal_tools.js only when the server actually serves it (no-op on github.io)

Style/shared_validation.js — File Validation

Constant/Function Description
BLOCKED_EXTS Array of 55 dangerous file extensions
MAGIC_BYTES / DANGEROUS_MAGIC Format signatures (PNG/JPEG/GIF/WebP/BMP/TIFF/PDF/MPEG/WAV/FLAC/OGG/MP4/WebM/AVI) and dangerous signatures
DANGEROUS_PATTERNS / DOC_THREAT_PATTERNS Content and PDF threat patterns
validateFileInput(inputElement) async 8-stage pipeline (takes the <input>, not a File)
isDangerousFile(file) Extension blocklist check
matchesMagicBytes / hasDangerousMagic / detectDangerousMagic / fileHasExtension Magic-byte helpers
hasDangerousContent(text) / checkDangerousContent(file) UTF-8 content scan (first 4096 bytes)
checkDocumentThreats(buffer) PDF /JavaScript, /JS, /OpenAction detection
checkFileStructure(buffer) PNG IEND / JPEG EOI structural check
matchesAccept(file, input) accept attribute matcher
isEnglishFilename(name) RTL-override / homoglyph filename guard
clearInputFiles(input) Reset a file input

Style/simplified.js — Simplified Mode Pipeline

Function Description
initSimplified() / renderStep() / renderProgress() Wizard bootstrap and rendering
simpleNext() / simplePrev() / restartSimple() Step navigation with validation
runWatermarkStep() / runAudioWatermarkStep() / runPixelInjectStep() Embed steps (with progress bar)
runTimestampStep() / runFingerprintStep() / runDIDStepGenerate() / runDIDStepSign() Proof steps
runC2paStep() C2PA signing (last pixel step; validates links, no synthetic change events)
simpleEnsureSection(name) Lazy-loads a section's module before running its step
detectFileType(file) / buildSteps() / setMode() / switchMode() Mode + step management

Companion files: simplified_helpers.js (saveSimpleUserInfo()), simplified_renderers.js (step HTML builders), simplified_countries.js (showProgress(), hideProgress(), clearSimpleData(), openLightbox(), closeLightbox(), prefixHttps(), validateEmailInput(), validatePhoneInput(), validateUrlInput(), validateSocialInput()).

Style/navigation.js — SPA Router

Function Description
showPage(pageId) Navigate to page, update title/meta/history
hideAllExcept(...) / handleHashNav() / initNav() Routing internals
switchWmTab / switchOtsTab / switchC2paTab(mode) Tool tab switchers
showDownloadModal() / closeDownloadModal() / downloadResult() Shared download modal
sanitizeRemovalTools() Strips removal-tools links on github.io
PAGE_TITLES / PAGE_DESCS SEO title/description maps

Style/mpa-router.js — MPA AJAX Router

IIFE-wrapped. Exposes only globalThis.__mpaNavigate(url, pageName) and globalThis.__mpaGoHome(); navigateTo, page caching, and hash-based initial load are internal. Detects data-standalone to enable MPA mode; removal-tools targets always fall back to a full-page redirect.

Style/i18n.js — Internationalization (8 languages)

Function Description
__(key, fallback) Get translation for key (English fallback if missing)
switchLang(lang) / loadLang(lang) / applyLang() Language switching and lazy file loading
detectLang() Detect browser language from navigator.languages
sanitizeHtml(text) Tag-whitelist sanitizer + event-handler stripping
langBtnText() / getLanguageDisplayName() / toggleLangDropdown() UI helpers

Languages: ar (Arabic RTL), de, en, es, fr, ja, ko, zh.

Function Description
buildSearchIndex() Build searchable index (SPA + _loadMpaIndex() for MPA JSON)
siteSearch() Run a search
showSearchResults() / navigateToSearchResult() / closeSearchResults() Result UI

Style/music-player.js — Background Music Player

IIFE-wrapped. Exposes globalThis.__musicPlayerState(), __musicSaveTime(), and __musicInit; playlist/play/pause logic is internal and persists across MPA navigations.

Watermark/watermark.js — Watermark Core Interface

Function Description
watermarkEmbed(type, imageFile, secretFile, password) Embed; returns {ok, data, msg} (password required except types 5, 8)
watermarkExtract(type, imageFile, password) Extract
handleWatermarkEmbed() / handleWatermarkExtract() UI handlers
detectWatermarkAlgorithm(imgFile, password) Auto-detect across types 1-9 (priority 8, 9, 4, 7, 2, 1, 3, 6, 5)
updateCapacity() Capacity meter
wmToTXT / wmToCSV / wmToXML / wmToHTML / downloadWatermark(format) Export in PDF/DOCX/JSON/CSV/TXT/XML/HTML

Watermark/watermark_core.js — Low-Level Primitives

rgbToYcbcr, ycbcrToImageData, dct8x8 / idct8x8, blockIter, getBlock8 / setBlock8, embedInDCT / extractFromDCT, maxDCTBits, wm1_embed / wm1_extract, wm3_order / wm3_embed / wm3_extract, wm6_*, wm8_* (types 2/4/5/7/9 are driven inline from watermark.js).

Watermark/utils.js — Watermark Utilities

bits(n), from_bits(b), xor_bytes(a, b), pw_key(password) (PBKDF2), seededShuffle(arr, seed).

Audio_Watermark/audio_watermark_core.js

awReadWav, awReadWavRaw, awWriteWav, awLoadAudio, awFft / awIfft, awHaarFwd / awHaarInv, awDct / awIdct, awFormatPayload / awExtractPayload, plus aw1_-aw8_embed / awN_extract and awN_maxBits for each of the 8 algorithms.

Audio_Watermark/audio_watermark.js — UI Handlers

switchAwmTab, loadAwmFile, updateAwmCapacity, handleAwmEmbed, handleAwmExtract, awmMultiDetect, awmDualExtract, tryExtractSingle, tryExtractAuto, awmSelfTest.

Document_Watermark/

File Key functions
document_watermark_core.js docwEmbed(text, msg, algo, password), docwExtract, docwAutoDetect, docwEstimateCapacity, _msgToBits, _checkPassword, _deflate / _inflate
document_watermark.js switchDocwTab, handleDocwEmbed, handleDocwExtract, buildWatermarkedDocx, docwCopyResult, docwDownloadResult, docwExtractTextFromBuf
document_watermark_pdf.js buildWatermarkedPdfDoc, downloadDocw, docwToTXT/CSV/XML/HTML, _decompressRaw, _pdfBuildCMap, _pdfReplaceInStream
document_watermark_report.js _docwBuildReportPdf, _docwBuildReportDocx, _docwBuildReportHtml, _docwQrDataURL
text_extractor.js docwExtractText (TXT/DOCX/PDF extraction)

Pixel_Injection/pixel_injection.js

class PixelInjection — initializeEventListeners, setupPixelInjectionUI, handlePixelInjection, handlePixelExtraction, handlePixelAnalysis, runDetectionAlgorithm, showDetectionResults, getAdvancedOptions, loadImage, extractMessageFromImageData, analyzeImageCharacteristics, downloadBlobSimple, initPixelInjection. Globals: pixelInjection (instance), switchPiTab, updatePiAlgorithms, updatePiOptions, showPiAdvancedOptions.

Pixel_Injection/watermark_core_advanced.js

Exports window.WatermarkCore. Transform methods (from watermark_core_transforms.js): dct, dwt, dft, hybridDCTDWT, applyDCT / applyInverseDCT, applyDWT / applyInverseDWT, apply2DDFT / applyInverse2DDFT, optimizeMessageDistribution. Algorithm + analysis methods (from watermark_core_algorithms.js): vine, pixelSeal, nullguard, shallowDiffuse, imagewmark, metaSeal, stardustmark, invisimark, elevenlikes, diffusionBased, spread-spectrum/JND helpers, robustness simulations (simulateCompression / Cropping / Rotation / Scaling / Filtering), quality metrics (calculatePSNR, calculateSSIM, calculateLPIPS, calculateBER), and blind extraction (extractLSB, extractEnhancedLSB, extractMultiChannelLSB, extractDCT, extractDWT, ...).

Pixel_Injection/watermark_advanced_ui.js

class AdvancedWatermarkUI — initializeUI, createAlgorithmSelector, updateAdvancedOptions, handleAdvancedEmbed, handleAdvancedExtract, getAdvancedOptions, runRobustnessTest, testCompression / testCropping / testRotation / testScaling, testStatisticalDetection, testMLDetection, testBlindDecoding, autoDetectAlgorithm, displayRobustnessResults.

Pixel_Injection/advanced_watermarking.js

Exports the alternative window.AdvancedWatermarking class (embed/extract variants for all categories).

Fingerprint/hashing.js

Function Description
fingerprintFile(file, onProgress) Full fingerprint (WebCrypto SHA-1/256/384/512 + SHA-224, SHA-3 family, BLAKE2b/2s/3, MD2/4/5, RIPEMD-160, Whirlpool)
fastFingerprint(data) Quick first-pass hash
computeRemainingHashes(data, done) Remaining algorithms (background worker via startBackgroundWorker)
sha224, md5, md2, md4, ripemd160, blake2b, blake2s, blake3, sha3, shake, whirlpool Pure-JS implementations (SHA-1/256/384/512 come from crypto.subtle, not this file)

Fingerprint/hashing_perceptual.js

ahash, dhash, phash, whash, resizeImageData.

Fingerprint/fingerprint_ui.js

handleFingerprint(), downloadFingerprint(format), fpToPDF / fpToDOCX / fpToCSV / fpToTXT / fpToXML / fpToHTML.

C2PA/c2pa.js

Function Description
window.handleC2paRead() Reads the manifest from the file input (c2pa-read-file) — no arguments
window.handleC2paWrite() Signs the selected file
window.handleC2paVerify() Verifies signature + validity
window.updateC2paWriteForm() Syncs form-type checkboxes
showC2paDownloadModal() / downloadC2pa() Download helpers
c2paToPDF / c2paToDOCX / c2paToCSV / c2paToTXT / c2paToXML / c2paToHTML Manifest exporters
getC2pa() / createBrowserSigner() / addIngredientFromFile() WASM loader + ECDSA P-256 signer

C2PA/cbor.js (ES module)

encodeInt, encodeBstr, encodeTstr, encodeArray, encodeMap, encodeTag, concat, decode — minimal CBOR for COSE Sign1 construction.

Decentralized_Identity_DID/did.js

didGenerateEd25519Keypair(), didGenerateP256Keypair(), didGenerateRSAKeypair(), didGenerateKeypair(), didKeyEncode / didKeyDecode, base58Encode / base58Decode, didSign(data) / didVerify(data, sig), didStoreKeys / didLoadKeys / didClearKeys, didGenerateDocument(), didCreateVerifiableCredential(), handleDidGenerate() / handleDidSign(), downloadDID(), exporters didToJSON/CSV/TXT/XML/PDF/DOCX.

Certificate/ (6 files)

File Key functions
certificate.js collectCertData, generateProfessionalCert, downloadProfessionalCert, downloadCert, showCertOverlay / hideCertOverlay, downloadCertOtsProof, initCertPhoneCode
certificate_pdf.js downloadCertPDF(data)
certificate_docx.js downloadCertDOCX(data)
certificate_epub.js downloadCertEPUB(data)
certificate_ots.js generatePendingOts, submitCertTransparency
certificate_utils.js makeCertDataURL, generateQRDataURL, buildQRVerificationJSON, getFileHashSha256, addTextSafe, loadImageDimensions, makeUUID, fmtSize, escHtml

Timestamp/timestamp.js

otsBuildDetached(hash), otsParse(data), upgradeOts(hash), getOtsUpgradeCommand(), handleOtsCreate(file), handleOtsVerify(file, otsFile).

Metadata/metadata.js

readMetadata(file), parseJPEGExif(buffer), parseIFD, handleReadMetadata(), downloadMetadata(format) with exporters mdToCSV/TXT/XML/HTML/PDF/DOCX.

Forensic/forensic.js / Forensic/forensic_core.js

  • forensic.js: analyzeForensics(), handleForensicAnalyze(), forensicDiffImageData(d1, d2), forensicNoiseHeatmap(), forensicDrawMatches(), renderForensicResult(), forensicRiskBadge(), canvas helpers.
  • forensic_core.js: IIFE that publishes globalThis.RedoSanForensicCore = { parseJpegMarkers, analyzeNoise, detectCopyMove, metadataSignals, combineFindings, buildSummary } (also module.exports for CLI reuse).

ID_Forge/id_forge.js

uuidv4(), uuidv7(), ulid(), nanoid(len), swhid(input), bulk variants (uuidv4Bulk, uuidv7Bulk, ulidBulk, nanoidBulk), computeSwhidFromFile, computeSwhidFromText, extractHashFromOts, handleIdForgeGenerate(), idForgeCopy(), idForgeDownload(format).

Converter/converter.js

convDetectType(file), convGetFormats(type), handleConvFile(), handleConvConvert(), convRun(), image (convImage, convLoadImage), audio (convAudio, convAudioToMp3, convEncodeWav, ...), video (convVideo, convVideoFfmpeg, convGifEncode, ...), subtitles (convSubtitle, convSubWriteSrt/Vtt/Ass/Sub/Sbv/Lrc/Ttml/Txt), documents (convDocument, convDocToTxt/Html/Md/Pdf/Docx/Json/Xml/Csv) — all object-URL downloads revoke their URL afterwards.

Assistant/assistant.js — Raido Chatbot

getAssistantResponse(query), matchAssistantIntent(), getAssistantSuggestions(), sendAssistantMessage(), initAssistant(), toggleAssistant(), loadChatHistory / saveChatHistory / clearChatHistory. Intent matching: 80+ patterns (AR + EN), context-aware, Levenshtein fallback. (There is no raiseQuery().)

Face_Biometric/ (15 files)

  • face_engine.js — window.FaceEngine (detection/alignment/embedding pipeline)
  • face_ui.js — pipeline handlers: initFaceBiometric, handleFaceFilePicked, handleFaceRun, runFacePipeline, renderFaceReport, downloadFaceReport (+ CSV/TXT/XML/HTML/PDF/DOCX exporters), listRegisteredFaces, handleFaceDelete, camera (handleFaceCameraStart/Stop/Capture, startFaceOverlay), runFaceLivenessCheck, consent (initFaceConsent, handleFaceConsentAccept/Withdraw), passkeys (handlePasskeyRegister, handlePasskeyRemove, ensureFacePasskeyForAction), registry ops (handleFaceLock/Unlock, handleFaceBackup/Restore), verifiable credential (handleFaceIssueCredential, handleFaceVCDownload)
  • Supporting: face_registry, face_crypto, face_webauthn (PRF vault: b64urlToBytes, bytesToB64url), face_embed_onnx (ArcFace), face_liveness, face_antispoof, face_align, face_biohash, face_fuzzy (fuzzy vault: encode/decode, repeatCode, xorBytes), face_vc, face_standards, face_performance, face_camera

Voice_Biometric/ (19 files)

  • voice_engine.js — window.VoiceEngine
  • voice_ui.js — initVoiceBiometric, handleVoiceFilePicked, handleVoiceRecordStart/Stop/Abort, handleVoiceRun, runVoicePipeline, renderVoiceReport, downloadVoiceReport (+ exporters), listVoiceRegistered, handleVoiceDelete, consent handlers, recorder UI (initRecorderUI, showRecorderUI, startRecorderVisualization)
  • Supporting: voice_embed_onnx (ECAPA), voice_embed_wavlm (WavLM), voice_vad, voice_features (dftTables, framePowerSpectrum, computeLogMel), voice_antispoof, voice_liveness, voice_crypto, voice_template_protection, voice_registry, voice_standards, voice_performance, voice_microphone, voice_provenance, audio_embed (enc/dec, RIFF/ID3 helpers), c2pa_audio_hash, voice_capture_worklet

Iris_Biometric/ (11 files)

  • iris_engine.js — window.IrisEngine + IRIS_ENGINE_CONFIG
  • iris_ui.js — globals: irisInit, irisStartCamera, irisStopCamera, irisStartCapture, irisEnroll, irisVerify, irisIdentify, irisListTemplates, irisDeleteTemplate, handleIrisRun, runIrisPipeline, downloadIrisReport (+ exporters), _irisGetStats / _irisRecordFTA / _irisRecordFTER / _irisResetStats
  • Supporting: iris_camera (getUserMedia wrapper), iris_quality / iris_quality_full (ISO/IEC 29794-6), iris_liveness, iris_matcher (normalized Hamming distance), iris_storage (IndexedDB), iris_template_protection (ISO/IEC 24745), iris_standards (ISO/IEC 19794-6), iris_performance (ISO/IEC 19795)

Removal Tools (local-only)

Removal_Tools/removal_tools.js is a 40-byte placeholder in the repository — the directory is gitignored (committed removal: 6f2b8ee). On github.io, window.RedoSanLoadRemovalTools (shared.js) no-ops, sanitizeRemovalTools() hides the links, and the MPA router forces a full-page redirect. The page shell (Style/pages/removal-tools/index.html) exposes rt-wm, rt-pi, rt-c2pa, rt-meta, rt-audio-wm, rt-audio-meta, rt-doc-wm, rt-doc-meta, a mandatory rt-password field, and rt-btn / rt-status / rt-download.

vendor/ — Local Vendor Libraries

Library Version Purpose
jspdf.umd.min.js 2.5.1 PDF generation
qrious.min.js 4.0.2 QR code generation
jszip.min.js 3.10.1 ZIP/DOCX file handling
docx.umd.min.js 8.5.0 DOCX generation
pdf-lib.min.js bundled PDF modification
opentimestamps.min.js bundled OpenTimestamps verification

Local copies load first; CDN fallbacks (jsDelivr / unpkg / cdnjs, all version-pinned and SW-whitelisted) are used on failure. Lazily loaded CDN-only modules: @contentauth/c2pa-web@0.8.1 (+ WASM), @ffmpeg/core 0.11.1/0.12.1, lamejs@1.2.1, @vladmandic/human@3.3.6, onnxruntime-web@1.20.1, @tensorflow/tfjs-backend-wasm, plus Hugging Face model hosts for the biometric tools.



Related

Wiki: Architecture
Wiki: FAQ
Wiki: Home
Wiki: Installation
Wiki: Security
Wiki: Usage Guide
Wiki: _Sidebar