KHA-256

Contents

  • Quickstart
  • Installation
  • Usage

API Reference

  • kha256 package
    • KEÇECİ HASH ALGORITHM (KEÇECİ HASH ALGORİTMASI), KHA-256
    • KHA256
      • KHA256.hash()
      • KHA256.hmac()
      • KHA256.verify()
      • KHA256.version
      • KHA256.metrics
    • KHA256b
      • KHA256b.version
      • KHA256b.certificate
      • KHA256b.metrics
      • KHA256b.avalanche_score
      • KHA256b.hash()
      • KHA256b.verify()
      • KHA256b.hmac()
      • KHA256b.self_test()
    • FortifiedKhaHash256
      • FortifiedKhaHash256.KEY_SIZE
      • FortifiedKhaHash256.NONCE_SIZE
      • FortifiedKhaHash256.hash()
      • FortifiedKhaHash256.get_cache_stats()
      • FortifiedKhaHash256.clear_cache()
      • FortifiedKhaHash256.deterministic
      • FortifiedKhaHash256.test_avalanche_effect()
      • FortifiedKhaHash256.test_collision_resistance()
      • FortifiedKhaHash256.test_uniformity()
      • FortifiedKhaHash256.get_stats()
      • FortifiedKhaHash256.get_security_report()
    • OptimizedKhaHash256
      • OptimizedKhaHash256.__init__()
      • OptimizedKhaHash256.metrics
      • OptimizedKhaHash256.hash()
      • OptimizedKhaHash256.get_cache_stats()
      • OptimizedKhaHash256.clear_cache()
      • OptimizedKhaHash256.get_metrics()
      • OptimizedKhaHash256.enable_turbo_mode()
    • SecureKhaHash256
      • SecureKhaHash256.hash()
      • SecureKhaHash256.verify_avalanche()
    • HybridKhaHash256
      • HybridKhaHash256.SMALL_DATA_THRESHOLD
      • HybridKhaHash256.MEDIUM_DATA_THRESHOLD
      • HybridKhaHash256.__init__()
      • HybridKhaHash256.metrics
      • HybridKhaHash256.hash()
      • HybridKhaHash256.get_cache_stats()
      • HybridKhaHash256.clear_cache()
      • HybridKhaHash256.get_metrics()
      • HybridKhaHash256.enable_hybrid_mode()
    • SimpleKhaHasher
      • SimpleKhaHasher.DEFAULT_SALT
      • SimpleKhaHasher.__init__()
      • SimpleKhaHasher.hash()
      • SimpleKhaHasher.get_security_report()
    • Shake256Hasher
      • Shake256Hasher.__init__()
      • Shake256Hasher.hash()
      • Shake256Hasher.hash_hex()
      • Shake256Hasher.hash_int()
      • Shake256Hasher.file_hash()
    • TrueMemoryHardHasher
      • TrueMemoryHardHasher.hash()
      • TrueMemoryHardHasher.verify()
    • CoreEngine
      • CoreEngine.hash()
    • CoreHash
      • CoreHash.hash()
    • DeterministicEngine
      • DeterministicEngine.hash()
    • DeterministicHash
      • DeterministicHash.hash()
    • MemoryHardEngine
      • MemoryHardEngine.blocks
      • MemoryHardEngine.iterations
      • MemoryHardEngine.hash()
    • MemoryHardHash
      • MemoryHardHash.memory_blocks
      • MemoryHardHash.iterations
      • MemoryHardHash.hash()
    • FortifiedKhaCore
      • FortifiedKhaCore.stats
      • FortifiedKhaCore.text_stats
      • FortifiedKhaCore.list_stats
      • FortifiedKhaCore.dict_stats
      • FortifiedKhaCore.hash()
    • PerformanceOptimizedKhaCore
    • MockCore
      • MockCore.MockConfig
        • MockCore.MockConfig.shuffle_layers
        • MockCore.MockConfig.deterministic
        • MockCore.MockConfig.enable_quantum_mix
        • MockCore.MockConfig.enable_diffusion_mix
        • MockCore.MockConfig.salt_length
    • StreamingKHA256
      • StreamingKHA256.update()
      • StreamingKHA256.digest()
      • StreamingKHA256.hexdigest()
      • StreamingKHA256.reset()
    • FortifiedConfig
      • FortifiedConfig.VERSION
      • FortifiedConfig.ALGORITHM
      • FortifiedConfig.output_bits
      • FortifiedConfig.hash_bytes
      • FortifiedConfig.iterations
      • FortifiedConfig.rounds
      • FortifiedConfig.components_per_hash
      • FortifiedConfig.salt_length
      • FortifiedConfig.shuffle_layers
      • FortifiedConfig.diffusion_rounds
      • FortifiedConfig.avalanche_boosts
      • FortifiedConfig.use_enhanced_avalanche
      • FortifiedConfig.enable_quantum_mix
      • FortifiedConfig.enable_diffusion_mix
      • FortifiedConfig.triple_compression
      • FortifiedConfig.memory_hardening
      • FortifiedConfig.enable_byte_distribution_optimization
      • FortifiedConfig.byte_uniformity_rounds
      • FortifiedConfig.time_varying_salt
      • FortifiedConfig.context_sensitive_mixing
      • FortifiedConfig.enable_side_channel_resistance
      • FortifiedConfig.enable_constant_time_ops
      • FortifiedConfig.enable_arithmetic_blinding
      • FortifiedConfig.memory_cost_kb
      • FortifiedConfig.time_cost
      • FortifiedConfig.parallelism
      • FortifiedConfig.memory_cost
      • FortifiedConfig.cache_enabled
      • FortifiedConfig.cache_size
      • FortifiedConfig.cache_ttl
      • FortifiedConfig.cache_hmac_protected
      • FortifiedConfig.cache_deterministic
      • FortifiedConfig.parallel_processing
      • FortifiedConfig.max_workers
      • FortifiedConfig.enable_memory_hard_mode
      • FortifiedConfig.double_hashing
      • FortifiedConfig.enable_encryption_layer
      • FortifiedConfig.encryption_rounds
      • FortifiedConfig.enable_hamming_weight_balancing
      • FortifiedConfig.target_hamming_weight
      • FortifiedConfig.chi_square_optimization
      • FortifiedConfig.min_bit_bias
      • FortifiedConfig.max_bit_correlation
      • FortifiedConfig.enable_case_aware_mixing
      • FortifiedConfig.case_sensitivity_boost
      • FortifiedConfig.ascii_case_amplification
      • FortifiedConfig.case_diffusion_factor
      • FortifiedConfig.security_level
      • FortifiedConfig.expected_performance_ms
      • FortifiedConfig.avalanche_target
      • FortifiedConfig.to_dict()
    • OptimizedFortifiedConfig
      • OptimizedFortifiedConfig.max_cache_size
    • MemoryHardConfig
      • MemoryHardConfig.memory_cost_kb
      • MemoryHardConfig.time_cost
      • MemoryHardConfig.parallelism
      • MemoryHardConfig.enable_sequential_memory_fill
      • MemoryHardConfig.enable_memory_dependency_chain
      • MemoryHardConfig.memory_access_pattern
      • MemoryHardConfig.target_memory_bandwidth_utilization
      • MemoryHardConfig.max_cpu_utilization
      • MemoryHardConfig.cache_enabled
      • MemoryHardConfig.parallel_processing
      • MemoryHardConfig.max_workers
    • TrueMemoryHardConfig
      • TrueMemoryHardConfig.memory_cost_kb
      • TrueMemoryHardConfig.time_cost
      • TrueMemoryHardConfig.parallelism
      • TrueMemoryHardConfig.cache_enabled
      • TrueMemoryHardConfig.parallel_processing
      • TrueMemoryHardConfig.max_workers
      • TrueMemoryHardConfig.enable_memory_hard_fill
      • TrueMemoryHardConfig.memory_fill_algorithm
      • TrueMemoryHardConfig.double_hashing
      • TrueMemoryHardConfig.triple_compression
      • TrueMemoryHardConfig.target_memory_bandwidth_utilization
    • SecurityConstants
      • SecurityConstants.MIN_SALT_LENGTH
      • SecurityConstants.MIN_KEY_LENGTH
      • SecurityConstants.MIN_ITERATIONS
      • SecurityConstants.MIN_ROUNDS
      • SecurityConstants.MEMORY_COST
      • SecurityConstants.MEMORY_COST_KB
      • SecurityConstants.TIME_COST
      • SecurityConstants.PARALLELISM
    • SecurityLayers
      • SecurityLayers.constant_time_compare()
      • SecurityLayers.timing_attack_protection()
      • SecurityLayers.arithmetic_blinding()
      • SecurityLayers.secure_memory_zero()
      • SecurityLayers.apply_constant_time_operations()
    • MathematicalSecurityBases
      • MathematicalSecurityBases.SECURITY_CONSTANTS
      • MathematicalSecurityBases.TRANSFORMATIONS
      • MathematicalSecurityBases.get_constant()
      • MathematicalSecurityBases.apply_transformations()
      • MathematicalSecurityBases.generate_secure_matrix()
    • ByteDistributionOptimizer
      • ByteDistributionOptimizer.optimize_byte_distribution()
      • ByteDistributionOptimizer.calculate_byte_uniformity()
    • TransformFunctions
      • TransformFunctions.f1()
      • TransformFunctions.f2()
      • TransformFunctions.f3()
      • TransformFunctions.f4()
      • TransformFunctions.chaos()
      • TransformFunctions.mix3()
      • TransformFunctions.mix4()
    • HardwareSecurityID
      • HardwareSecurityID.get_hardware_id()
    • HardwareSecurityID2
      • HardwareSecurityID2.get_hardware_id()
    • KHAcache
      • KHAcache.__init__()
      • KHAcache.get()
      • KHAcache.put()
      • KHAcache.clear()
      • KHAcache.invalidate()
      • KHAcache.metrics
    • KHA256Utils
      • KHA256Utils.rotr64()
      • KHA256Utils.rotl8()
      • KHA256Utils.secure_random()
      • KHA256Utils.bytes_to_words64()
      • KHA256Utils.bit_diff()
      • KHA256Utils.entropy()
    • KHAUtils
      • KHAUtils.rotl64()
      • KHAUtils.rotr64()
      • KHAUtils.rotl8()
      • KHAUtils.secure_random()
      • KHAUtils.bytes_to_words64()
      • KHAUtils.bytes_to_words32()
      • KHAUtils.bit_diff()
    • Kha256SecureStorage
      • Kha256SecureStorage.protect()
      • Kha256SecureStorage.verify()
    • KHA256UnicodeHasher
      • KHA256UnicodeHasher.unicode_hash()
      • KHA256UnicodeHasher.new_salt()
    • SimpleRateLimiter
      • SimpleRateLimiter.is_allowed()
      • SimpleRateLimiter.get_stats()
      • SimpleRateLimiter.reset_ip()
    • RateLimiterDemoUI
      • RateLimiterDemoUI.display()
    • SecureLoginSystem
      • SecureLoginSystem.login_attempt()
      • SecureLoginSystem.get_stats()
      • SecureLoginSystem.reset_system()
    • MockAuthSystem
      • MockAuthSystem.authenticate()
      • MockAuthSystem.get_user_info()
    • MemoryHardDemo
      • MemoryHardDemo.users_db
      • MemoryHardDemo.mock_memory_hard_hash()
      • MemoryHardDemo.normal_hash()
      • MemoryHardDemo.demo_registration()
      • MemoryHardDemo.demo_login()
      • MemoryHardDemo.demo_brute_force_analysis()
      • MemoryHardDemo.demo_performance()
      • MemoryHardDemo.demo_security_levels()
      • MemoryHardDemo.list_users()
      • MemoryHardDemo.interactive_menu()
      • MemoryHardDemo.show_info()
    • secure_hash_password()
    • safe_hash_password()
    • hash_password()
    • hash_password_str()
    • verify_password()
    • batch_hash_secure()
    • batch_hash_xxh64()
    • quick_hash()
    • quick_hash_raw()
    • quick_hash_sha256()
    • quick_hash_blake3()
    • quick_hash_128()
    • safe_quick_hash()
    • ultra_fast_hash()
    • ultra_fast_hash_hex()
    • ultra_fast_hash_int_to_hex()
    • fast_hash_int()
    • fastest_cache_key()
    • xxh64_hash()
    • fnv1a_64()
    • djb2_optimized()
    • shake256_hash()
    • shake256_128()
    • shake256_256()
    • shake256_512()
    • gizli_turkce_hash()
    • fixed_gfh_password()
    • hash_argon2id()
    • hash_bcrypt()
    • hash_pbkdf2()
    • hwid_hash()
    • generate_hwid()
    • generate_compact_hwid()
    • generate_secure_hwid()
    • simple_hmac()
    • image_signature()
    • run_all_tests()
    • run_cli_demo()
    • run_comprehensive_test()
    • run_comprehensive_test_suite()
    • performance_comparison()
    • economic_analysis()
    • secure_password_hashing()
    • show_rate_limiter_info()
    • db
      • db.thread_local
      • db.get_db_connection()
      • db.setup_database()
      • db.save_user()
      • db.verify_user()
      • db.list_users()
      • db.delete_user()
      • db.close_all_connections()
      • db.widgets
      • db.HTML
      • db.clear_output()
      • db.display()
      • db.interactive_demo()
    • test_shake256()
    • test_kha256_main()
    • test_kha256b()
    • test_khautils()
    • test_basic_functionality()
    • test_core_hash()
    • test_deterministic_hash()
    • test_memory_hard_engine()
    • test_memory_hard_hash()
    • test_memory_hard_real()
    • test_memory_hardness()
    • test_true_memory_hard()
    • test_true_memory_hard_direct()
    • test_fortified_hashers()
    • test_fortified_memory_hard()
    • test_fortified_memory_hard2()
    • test_fortified_memory_hard_fixed()
    • test_hmac()
    • test2_hmac()
    • test_streaming()
    • test2_streaming()
    • test_avalanche()
    • test2_avalanche()
    • test_edge_cases()
    • test_parameter_impact()
    • test_performance_scenarios()
    • test_real_world_scenarios()
    • test_security_scenarios()
    • avalanche_test()
    • comprehensive_avalanche_test()
    • detailed_avalanche_test()
    • cig_test()
    • gpu_resistance_test()
    • min_entropy_test()
    • diagnose_memory_hardness()
    • benchmark_real_cost()
    • plot_avalanche_distribution()
    • safe_heatmap_plot()
    • plot_avalanche_simple()
    • HKDF
      • HKDF.derive()
      • HKDF.derive_into()
      • HKDF.extract()
      • HKDF.verify()
    • secure_compare()
    • xor_bytes()
    • bytes_to_int()
    • int_to_bytes()
    • cal_bit_difference()
    • calculate_bit_difference()
    • chacha_avalanche_mix()
    • secure_avalanche_mix()
    • expose_kha256_bug()
    • generate_fortified_hasher()
    • generate_fortified_hasher_fast()
    • generate_fortified_hasher_secure()
    • generate_fortified_hasher_password()
    • get_hasher_config()
    • measure_hash()
    • measure_time()
    • debug_configs()
    • lru_cache()
    • print_error()
    • print_header()
    • print_info()
    • print_results_table()
    • print_subheader()
    • print_success()
    • print_warning()
    • kha_rastgele_sayi()
    • rastgele_sayi()
    • kha256_fortified_random()
    • kha256_password_random()
    • kha256_memory_hard_random()
    • kha256_hard_random()
    • true_memory_hard_random()
    • memory_hard_hash_random()
    • memory_hard_engine_random()
    • fortified_kha_random()
    • kha256b_random()
    • scrypt_random()
    • gscrypt_random()
    • bscrypt_random()
    • scrypt_dual_output()
    • is_jupyter()
    • silent_kn()
    • Colors
      • Colors.GREEN
      • Colors.YELLOW
      • Colors.RED
      • Colors.BLUE
      • Colors.MAGENTA
      • Colors.CYAN
      • Colors.WHITE
      • Colors.RESET
      • Colors.BOLD
      • Colors.UNDERLINE
    • legacy_function()
    • Submodules
      • kha256.kha256 module
        • KHA-256 (Keçeci Hash Algorithm)
        • silent_kn()
        • logger
        • is_jupyter()
        • check_serial_info()
        • KHAcache
        • SecurityConstants
        • FortifiedConfig
        • min_entropy_test()
        • TransformFunctions
        • KHAUtils
        • DeterministicHash
        • MemoryHardHash
        • CoreHash
        • KHA256
        • StreamingKHA256
        • test_hmac()
        • test_streaming()
        • test_avalanche()
        • KHAConstants
        • KHA256Utils
        • DeterministicEngine
        • MemoryHardEngine
        • CoreEngine
        • KHA256b
        • cig_test()
        • TrueMemoryHardHasher
        • diagnose_memory_hardness()
        • TrueMemoryHardConfig
        • MemoryHardConfig
        • measure_time()
        • test_memory_hardness()
        • ByteDistributionOptimizer
        • SecurityLayers
        • MathematicalSecurityBases
        • FortifiedKhaCore
        • PerformanceOptimizedKhaCore
        • test_memory_hard_real()
        • test_true_memory_hard_direct()
        • test_fortified_memory_hard()
        • FortifiedKhaHash256
        • test_fortified_memory_hard_fixed()
        • OptimizedFortifiedConfig
        • HybridKhaHash256
        • OptimizedKhaHash256
        • generate_fortified_hasher()
        • generate_fortified_hasher_password()
        • generate_fortified_hasher_fast()
        • generate_fortified_hasher_secure()
        • hash_password()
        • hash_password_str()
        • quick_hash()
        • quick_hash_sha256()
        • quick_hash_blake3()
        • quick_hash_raw()
        • ultra_fast_hash()
        • ultra_fast_hash_hex()
        • ultra_fast_hash_int_to_hex()
        • fastest_cache_key()
        • fnv1a_64()
        • djb2_optimized()
        • hash_argon2id()
        • hash_bcrypt()
        • hash_pbkdf2()
        • batch_hash_xxh64()
        • batch_hash_secure()
        • fast_hash_int()
        • secure_hash_password()
        • xxh64_hash()
        • quick_hash_cached()
        • quick_hash_128()
        • gizli_turkce_hash()
        • KHA256UnicodeHasher
        • Shake256Hasher
        • shake256_hash()
        • shake256_128()
        • shake256_256()
        • shake256_512()
        • test_shake256()
        • measure_hash()
        • test_fortified_hashers()
        • print_results_table()
        • gpu_resistance_test()
        • secure_avalanche_mix()
        • chacha_avalanche_mix()
        • MockCore
        • test_deterministic_behavior()
        • DeterministicTest
        • test_parameter_impact()
        • expose_kha256_bug()
        • benchmark_real_cost()
        • fixed_gfh_password()
        • debug_configs()
        • verify_password()
        • get_hasher_config()
        • generate_hwid()
        • generate_compact_hwid()
        • generate_secure_hwid()
        • hwid_hash()
        • hwid_hash_cached()
        • HardwareSecurityID
        • HardwareSecurityID2
        • SecureKhaHash256
        • SimpleKhaHasher
        • SimpleRateLimiter
        • MockAuthSystem
        • SecureLoginSystem
        • RateLimiterDemoUI
        • run_cli_demo()
        • show_rate_limiter_info()
        • MemoryHardDemo
        • db
        • performance_comparison()
        • economic_analysis()
        • secure_password_hashing()
        • Colors
        • print_header()
        • print_subheader()
        • print_success()
        • print_error()
        • print_warning()
        • print_info()
        • safe_hash_password()
        • safe_quick_hash()
        • calculate_bit_difference()
        • cal_bit_difference()
        • avalanche_test()
        • detailed_avalanche_test()
        • comprehensive_avalanche_test()
        • safe_heatmap_plot()
        • plot_avalanche_distribution()
        • test_basic_functionality()
        • test_performance_scenarios()
        • test_security_scenarios()
        • test_real_world_scenarios()
        • test_edge_cases()
        • run_comprehensive_test_suite()
        • Kha256SecureStorage
        • run_comprehensive_test()
        • xor_bytes()
        • bytes_to_int()
        • int_to_bytes()
        • secure_compare()
        • simple_hmac()
        • test_khautils()
        • test_core_hash()
        • test_deterministic_hash()
        • test_memory_hard_hash()
        • func()
        • test_memory_hard_engine()
        • test_kha256_main()
        • test_kha256b()
        • test2_streaming()
        • test2_avalanche()
        • test2_hmac()
        • test_true_memory_hard()
        • test_fortified_memory_hard2()
        • plot_avalanche_simple()
        • kha_rastgele_sayi()
        • rastgele_sayi()
        • kha256_hard_random()
        • kha256_memory_hard_random()
        • kha256_password_random()
        • kha256_fortified_random()
        • true_memory_hard_random()
        • memory_hard_hash_random()
        • memory_hard_engine_random()
        • fortified_kha_random()
        • kha256b_random()
        • scrypt_random()
        • gscrypt_random()
        • bscrypt_random()
        • scrypt_dual_output()
        • image_signature()
        • run_all_tests()

Additional Resources

  • Citation
  • Changelog
    • v0.2.9 (2026)
KHA-256
  • Search


© Copyright 2026, Mehmet Keçeci.