MCPcopy Create free account
hub / github.com/MearaY/StegaPy / _make_lsb_plugin

Function _make_lsb_plugin

cli.py:33–50  ·  view source on GitHub ↗
(algo: str, bits: int, password: str,
                     compress: bool, encrypt: bool)

Source from the content-addressed store, hash-verified

31
32
33def _make_lsb_plugin(algo: str, bits: int, password: str,
34 compress: bool, encrypt: bool):
35 from StegaPy.plugin.lsb.lsb_config import LSBConfig
36 cfg = LSBConfig(
37 max_bits_used_per_channel=bits,
38 use_compression=compress,
39 use_encryption=encrypt,
40 password=password,
41 encryption_algorithm='AES128' if encrypt else None,
42 )
43 if algo == 'randlsb':
44 from StegaPy.plugin.randlsb import RandomLSBPlugin
45 plugin = RandomLSBPlugin()
46 else:
47 from StegaPy.plugin.lsb import LSBPlugin
48 plugin = LSBPlugin()
49 plugin.config = cfg
50 return plugin, cfg
51
52
53# ── 子命令处理 ─────────────────────────────────────────────────────────

Callers 2

cmd_embedFunction · 0.85
cmd_extractFunction · 0.85

Calls 3

LSBConfigClass · 0.90
RandomLSBPluginClass · 0.90
LSBPluginClass · 0.90

Tested by

no test coverage detected