图像加密与解密(XOR、Arnold、混沌、LSB 水印)
| 项目 | 数量 |
|---|---|
| 公开函数 | 29 |
| 公开类型 | 10 |
| 常量 | 0 |
| 错误类型 | 0 |
pub(all) struct ArnoldParams {
pub(all) struct ChaoticParams {
pub(all) enum EncryptionAlgorithm {
pub(all) struct EncryptionConfig {
pub(all) struct EncryptionQuality {
pub(all) struct EncryptionResult {
pub(all) struct ImageEncryptionQuality {
pub(all) struct WatermarkExtractionResult {
pub(all) struct WatermarkInfo {
pub(all) enum WatermarkType {pub fn adjacent_correlation(@types.Image, direction? : String) -> Double raise @types.LoadError
pub fn arnold_scramble(@types.Image, ArnoldParams) -> EncryptionResult raise @types.LoadError
pub fn batch_encrypt(Array[@types.Image], Double) -> Array[@types.Image] raise @types.LoadError
pub fn calculate_correlation(@types.Image, @types.Image) -> Double raise @types.LoadError
pub fn calculate_image_entropy(@types.Image) -> Double raise @types.LoadError
pub fn calculate_psnr(@types.Image, @types.Image) -> Double raise @types.LoadError
pub fn chaotic_encrypt(@types.Image, ChaoticParams) -> EncryptionResult raise @types.LoadError
pub fn create_default_arnold_params() -> ArnoldParams
pub fn create_default_chaotic_params() -> ChaoticParams
pub fn decrypt_image_logistic(@types.Image, key? : Double, mu? : Double) -> @types.Image raise @types.LoadError
pub fn decrypt_image_xor(@types.Image, String) -> @types.Image raise @types.LoadError
pub fn embed_visible_watermark(@types.Image, String, Int, Int, Double) -> @types.Image raise @types.LoadError
pub fn embed_watermark_lsb(@types.Image, Array[Byte], Int) -> (@types.Image, WatermarkInfo) raise @types.LoadError
pub fn encrypt_image_logistic(@types.Image, key? : Double, mu? : Double) -> @types.Image raise @types.LoadError
pub fn encrypt_image_xor(@types.Image, String) -> @types.Image raise @types.LoadError
pub fn encryption_default_config() -> EncryptionConfig
pub fn encryption_report_to_string(EncryptionResult, WatermarkInfo, ImageEncryptionQuality) -> String
pub fn evaluate_encryption_quality(@types.Image, @types.Image) -> EncryptionQuality raise @types.LoadError
pub fn evaluate_image_encryption_quality(@types.Image, @types.Image) -> ImageEncryptionQuality raise @types.LoadError
pub fn extract_watermark_lsb(@types.Image, Int, Int) -> WatermarkExtractionResult raise @types.LoadError
pub fn generate_chaotic_sequence_enc(ChaoticParams, Int) -> Array[Double]
pub fn histogram_entropy(@types.Image) -> Double raise @types.LoadError
pub fn key_sensitivity_test(@types.Image, Double, delta? : Double) -> Double raise @types.LoadError
pub fn xor_decrypt(EncryptionResult, Array[Byte]) -> @types.Image
pub fn xor_encrypt(@types.Image, Array[Byte]) -> EncryptionResult raise @types.LoadError
pub fn EncryptionAlgorithm::equal(Self, Self) -> Bool
pub fn EncryptionAlgorithm::not_equal(Self, Self) -> Bool
pub fn WatermarkType::equal(Self, Self) -> Bool
pub fn WatermarkType::not_equal(Self, Self) -> Boolpub(all) struct ChaoticParams {
x0 : Double
y0 : Double
z0 : Double
a : Double
b : Double
c : Double
iterations : Int
}pub(all) enum EncryptionAlgorithm {
XOR
AES_Simplified
Chaotic
Arnold
Hill
RSA_Simplified
Unknown
} derive(Eq)pub(all) struct EncryptionConfig {
method_type : String
key : Double
mu : Double
iterations : Int
}pub(all) struct EncryptionQuality {
entropy : Double
correlation_h : Double
correlation_v : Double
correlation_d : Double
npcr : Double
uaci : Double
}pub(all) struct EncryptionResult {
encrypted_data : Array[Byte]
width : Int
height : Int
channels : Int
algorithm : EncryptionAlgorithm
key_hash : String
encryption_time_ms : Double
file_size_original : Int
file_size_encrypted : Int
}fn ImageEncryptionQuality::not_equal(x : ImageEncryptionQuality, y : ImageEncryptionQuality) -> Boolpub(all) struct WatermarkExtractionResult {
watermark_data : Array[Byte]
watermark_width : Int
watermark_height : Int
similarity : Double
extracted : Bool
extraction_time_ms : Double
}pub(all) struct WatermarkInfo {
watermark_type : WatermarkType
watermark_data : Array[Byte]
watermark_width : Int
watermark_height : Int
strength : Double
embedded : Bool
embedding_position : String
key : String
}pub(all) enum WatermarkType {
Visible
Invisible_LSB
Invisible_DCT
Invisible_DWT
Robust
Fragile
Unknown
} derive(Eq)fn adjacent_correlation(img : core/types.Image, direction? : String) -> Double raise core/types.LoadErrorfn arnold_scramble(img : core/types.Image, params : ArnoldParams) -> EncryptionResult raise core/types.LoadErrorfn calculate_correlation(img1 : core/types.Image, img2 : core/types.Image) -> Double raise core/types.LoadErrorfn calculate_image_entropy(img : core/types.Image) -> Double raise core/types.LoadErrorfn calculate_psnr(original : core/types.Image, encrypted : core/types.Image) -> Double raise core/types.LoadErrorfn chaotic_encrypt(img : core/types.Image, params : ChaoticParams) -> EncryptionResult raise core/types.LoadErrorfn decrypt_image_logistic(img : core/types.Image, key? : Double, mu? : Double) -> core/types.Image raise core/types.LoadErrorfn decrypt_image_xor(img : core/types.Image, key : String) -> core/types.Image raise core/types.LoadErrorfn embed_visible_watermark(img : core/types.Image, watermark_text : String, x : Int, y : Int, opacity : Double) -> core/types.Image raise core/types.LoadErrorfn embed_watermark_lsb(img : core/types.Image, watermark : Array[Byte], strength : Int) -> (core/types.Image, WatermarkInfo) raise core/types.LoadErrorfn encrypt_image_logistic(img : core/types.Image, key? : Double, mu? : Double) -> core/types.Image raise core/types.LoadErrorfn encrypt_image_xor(img : core/types.Image, key : String) -> core/types.Image raise core/types.LoadErrorfn encryption_report_to_string(encryption : EncryptionResult, watermark : WatermarkInfo, quality : ImageEncryptionQuality) -> Stringfn evaluate_encryption_quality(original : core/types.Image, encrypted : core/types.Image) -> EncryptionQuality raise core/types.LoadErrorfn evaluate_image_encryption_quality(original : core/types.Image, encrypted : core/types.Image) -> ImageEncryptionQuality raise core/types.LoadErrorfn extract_watermark_lsb(img : core/types.Image, watermark_length : Int, strength : Int) -> WatermarkExtractionResult raise core/types.LoadErrorfn histogram_entropy(img : core/types.Image) -> Double raise core/types.LoadErrorfn key_sensitivity_test(img : core/types.Image, key : Double, delta? : Double) -> Double raise core/types.LoadErrorfn xor_encrypt(img : core/types.Image, key : Array[Byte]) -> EncryptionResult raise core/types.LoadErrorInstall
Download zipMoonBit domain imaging: medical, remote sensing, encryption, watermark, forensics, quality.