Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ZemerTeam/zemer-cipher/llms.txt
Use this file to discover all available pages before exploring further.
FunctionNameExtractor locates the signature and n-transform functions within a downloaded YouTube player_ias.vflset JS file. It checks PlayerConfigStore first — using validated, CDN-proven configs — and falls back to heuristic regex patterns only when no config entry is found for the player hash.
Package: com.zemer.cipher
Hardcoded configs always take precedence over regex extraction. A false positive from a legacy heuristic pattern cannot shadow a validated config entry. This also means a failed regex match on a known player hash is never a problem — the config path handles it.
Data Classes
SigFunctionInfo
Carries everything the cipher WebView needs to call the signature deobfuscation function.
The extracted or sentinel function name. When
jsExpression is non-null this is a sentinel value ("_expr_sig") and is not used for JS calls — jsExpression is used instead.A single integer constant argument passed as the first parameter to the sig function. Populated by legacy regex extraction.
null for expression-based configs and when not applicable.Multiple integer constant arguments passed to the sig function. Used for patterns that require more than one constant.
Name of a preprocessing function to call on the signature before passing it to the main sig function.
null when not required.Integer constant arguments for
preprocessFunc. null when preprocessFunc is null.true when this info came from a PlayerConfigStore entry rather than from regex extraction. CipherWebView uses this flag to choose the correct export injection strategy.Full JS expression for VM-dispatch players where no named function can be extracted. The placeholder
INPUT is replaced with the obfuscated signature at export time. When non-null, this is used instead of name / constantArg.NFunctionInfo
Carries everything the cipher WebView needs to call the n-transform function.
The extracted or sentinel function name. When
jsExpression is non-null this is a sentinel value ("_expr_n") and is not used for JS calls.Array index used when the n-transform function is stored in an array rather than as a top-level binding.
null when the function is accessed directly by name.Integer constant arguments prepended when calling the n-transform function. Populated when the function requires additional parameters beyond the n-value itself.
true when this info came from a PlayerConfigStore entry rather than from regex extraction.Full JS expression for the n-transform.
INPUT is replaced with the n-value at export time. When non-null, this is used instead of name / arrayIndex.HardcodedPlayerConfig
The in-memory representation of a single validated player config entry. Instances are created by PlayerConfigParser and stored in PlayerConfigStore.
Sentinel sig function name. Set to
"_expr_sig" for all config-file-sourced entries.Single integer constant argument for the sig function.
null for expression-based configs.Multiple integer constant arguments for the sig function.
null for expression-based configs.Name of a preprocessing function applied to the signature before the main sig call.
null for config-file-sourced entries.Arguments for
sigPreprocessFunc. null when sigPreprocessFunc is null.The sig call expression from the config file (e.g.
"mP(4,155,INPUT)"). INPUT is replaced with the obfuscated signature at export time.Sentinel n-function name. Set to
"_expr_n" for all config-file-sourced entries.Array index for the n-transform function.
null for config-file-sourced entries (the IIFE handles indexing internally).Integer constant arguments for the n-transform function.
null for config-file-sourced entries.The n-transform IIFE built by
PlayerConfigParser.buildNJsExpression. INPUT is replaced with the n-value at export time.The
signatureTimestamp (sts) value for this player. Sent in InnerTube /player API requests.Functions
hasQArrayObfuscation
var Q = "...".split("}") construct. analyzePlayerJs records this as the hasQArrayObfuscation field in the returned PlayerAnalysis.
The full text of the YouTube
player_ias.vflset JavaScript file.true if the Q-array pattern is detected, false otherwise.
extractSigFunctionInfo
null if both paths fail.
The full text of the YouTube
player_ias.vflset JavaScript file.An already-known 8-hex player hash (e.g. from
PlayerJsFetcher). When provided, the hash extraction step is skipped. When null, extractPlayerHash is called first.extractNFunctionInfo
extractSigFunctionInfo. Returns null if both paths fail.
The full text of the YouTube
player_ias.vflset JavaScript file.An already-known 8-hex player hash. When
null, extractPlayerHash is called first.extractSignatureTimestamp
signatureTimestamp (sts) value. Three sources are tried in priority order:
- Anchored
signatureTimestampliteral in the JS (e.g.signatureTimestamp:20613) — the player’s own embedded field, immune to config typos or stale remote pushes. - Config
stsvalue — used when the JS literal is absent, for players that don’t embed the field directly. - Loose
stspattern — a last-resort unanchored search that can false-match anywhere in ~2 MB of JS; only used when the other two paths both fail.
null if all three sources fail.
The full text of the YouTube
player_ias.vflset JavaScript file.An already-known 8-hex player hash used to look up the config
sts. When null, extractPlayerHash is called if needed.analyzePlayerJs
PlayerAnalysis that bundles all extracted values. Internally calls extractPlayerHash, hasQArrayObfuscation, extractSigFunctionInfo, extractNFunctionInfo, and extractSignatureTimestamp.
The full text of the YouTube
player_ias.vflset JavaScript file.An already-known 8-hex player hash. When provided, hash extraction is skipped and this value is used for all config lookups.
PlayerAnalysis(playerHash, hasQArrayObfuscation, sigInfo, nFuncInfo, signatureTimestamp)
extractPlayerHash
/player/<hash>/ in jsUrl, player_ias.vflset, and /s/player/ patterns). If all URL patterns fail, falls back to computing the MD5 of the first 10 000 characters of the JS and returning the first 4 bytes as an 8-hex string. This MD5-based hash is registered as an alias in config entries.
The full text of the YouTube
player_ias.vflset JavaScript file.getHardcodedConfig
PlayerConfigStore. Returns the HardcodedPlayerConfig if found, or null if the hash (and none of its aliases) is in the current table.
The 8-hex player hash to look up. Both primary hashes and alias hashes are accepted.