A whoooole lotta 4.0.x fixes.
This commit is contained in:
@@ -64,15 +64,37 @@ from stegasoo import (
|
||||
|
||||
# Models
|
||||
FilePayload,
|
||||
|
||||
# Constants
|
||||
EMBED_MODE_LSB,
|
||||
EMBED_MODE_DCT,
|
||||
EMBED_MODE_AUTO,
|
||||
DEFAULT_PASSPHRASE_WORDS,
|
||||
DEFAULT_PIN_LENGTH,
|
||||
)
|
||||
|
||||
# Import constants - try main module first, then constants submodule
|
||||
try:
|
||||
from stegasoo import (
|
||||
EMBED_MODE_LSB,
|
||||
EMBED_MODE_DCT,
|
||||
EMBED_MODE_AUTO,
|
||||
)
|
||||
except ImportError:
|
||||
from stegasoo.constants import (
|
||||
EMBED_MODE_LSB,
|
||||
EMBED_MODE_DCT,
|
||||
EMBED_MODE_AUTO,
|
||||
)
|
||||
|
||||
# Import constants that may not be in main __init__
|
||||
try:
|
||||
from stegasoo.constants import (
|
||||
DEFAULT_PASSPHRASE_WORDS,
|
||||
DEFAULT_PIN_LENGTH,
|
||||
MIN_PIN_LENGTH,
|
||||
MAX_PIN_LENGTH,
|
||||
)
|
||||
except ImportError:
|
||||
# Fallback defaults if constants not available
|
||||
DEFAULT_PASSPHRASE_WORDS = 4
|
||||
DEFAULT_PIN_LENGTH = 6
|
||||
MIN_PIN_LENGTH = 6
|
||||
MAX_PIN_LENGTH = 9
|
||||
|
||||
# Optional: strip_image_metadata from utils
|
||||
try:
|
||||
from stegasoo.utils import strip_image_metadata
|
||||
|
||||
Reference in New Issue
Block a user