初始化 StegaPy 实例,绑定核心插件与系统配置。
(self, plugin: StegaPyPlugin, config: StegaPyConfig)
| 33 | NAMESPACE = "StegaPy" |
| 34 | |
| 35 | def __init__(self, plugin: StegaPyPlugin, config: StegaPyConfig): |
| 36 | """初始化 StegaPy 实例,绑定核心插件与系统配置。""" |
| 37 | if plugin is None: |
| 38 | raise StegaPyException( |
| 39 | "未指定插件", |
| 40 | StegaPyErrors.NO_PLUGIN_SPECIFIED, |
| 41 | self.NAMESPACE |
| 42 | ) |
| 43 | if config is None: |
| 44 | raise StegaPyException( |
| 45 | "未指定配置", |
| 46 | StegaPyErrors.UNHANDLED_EXCEPTION, |
| 47 | self.NAMESPACE |
| 48 | ) |
| 49 | |
| 50 | self.plugin = plugin |
| 51 | self.config = config |
| 52 | |
| 53 | def embed_data(self, msg: bytes, msg_filename: Optional[str], |
| 54 | cover: Optional[bytes], cover_filename: Optional[str], |
nothing calls this directly
no test coverage detected