Hanhe Lin

70 papers A* 1A 1B 17Misc 2Journal 39Unranked 10
YearRankTypeTitle / Venue / Authors
2026 J jnl
IEEE Trans. Image Process.
Guanghui Yue, Lixin Zhang, Wanqing Liu, Jingfeng Du, Tianwei Zhou, Hanhe Lin, Qiuping Jiang, Wenqi Ren
2025 J jnl
CoRR
Ludi Li, Junbin Mao, Hanhe Lin, Xu Tian, Fang-Xiang Wu, Jin Liu
2025 J jnl
CoRR
Guangan Chen, Anh Minh Truong, Hanhe Lin, Michiel Vlaminck, Wilfried Philips, Hiêp Quang Luong
2025 J jnl
Neural Networks
Xu Tian, Hong-Dong Li, Hanhe Lin, Chao Li, Yu-Ping Wang, Harrison X. Bai, Wei Lan, Jin Liu
2025 J jnl
CoRR
Jiashuo Chang, Zhengyi Li, Jianxun Lou, Zhen Qiu, Hanhe Lin
2025 J jnl
IEEE Trans. Comput. Biol. Bioinform.
Jin Liu, Junbin Mao, Hanhe Lin, Hulin Kuang, Shirui Pan, Xusheng Wu, Shan Xie, Fei Liu, Yi Pan
2025 J jnl
Big Data Min. Anal.
Jiaxin Wei, Bin Jiao, Hanhe Lin, Xu Tian, Lu Shen, Jin Liu
2025 conf
BIBM
Ludi Li, Jin Liu, Hanhe Lin, Xu Tian, Mingzi Yuan, Jianchun Zhu, Jianxin Wang
2025 J jnl
IEEE Trans. Medical Imaging
Junbin Mao, Jin Liu, Xu Tian, Yi Pan, Emanuele Trucco, Hanhe Lin
2024 J jnl
IEEE Trans. Instrum. Meas.
Guanghui Yue, Yuanyan Li, Shangjie Wu, Bin Jiang, Tianwei Zhou, Weiqing Yan, Hanhe Lin, Tianfu Wang
2024 J jnl
IEEE Trans. Multim.
Shaolin Su, Hanhe Lin, Vlad Hosu, Oliver Wiedemann, Jinqiu Sun, Yu Zhu, Hantao Liu, Yanning Zhang, Dietmar Saupe
2024 J jnl
IEEE ACM Trans. Comput. Biol. Bioinform.
Rui Guo, Xu Tian, Hanhe Lin, Stephen J. McKenna, Hong-Dong Li, Fei Guo, Jin Liu
2024 J jnl
Big Data Min. Anal.
Jin Liu, Xu Tian, Hanhe Lin, Hong-Dong Li, Yi Pan
2024 J jnl
IEEE Trans. Neural Networks Learn. Syst.
Sam Slade, Li Zhang, Haoqian Huang, Houshyar Asadi, Chee Peng Lim, Yonghong Yu, Dezong Zhao, Hanhe Lin, Rong Gao
2024 J jnl
IEEE Trans. Multim.
Jianxun Lou, Hanhe Lin, Philippa Young, Richard D. White, Zelei Yang, Susan Cheng Shelmerdine, David Marshall, Emiliano Spezi, Marco Palombo, Hantao Liu
2024 Misc conf
ICASSP
Jin Liu, Dejiao Zeng, Ludi Li, Hanhe Lin, Xu Tian
2023 J jnl
IEEE Access
Xin Zhao, Jianxun Lou, Xinbo Wu, Yingying Wu, Lucie Lévêque, Xiaochang Liu, Pengfei Guo, Yipeng Qin, Hanhe Lin, Dietmar Saupe, Hantao Liu
2023 conf
BIBM
Junbin Mao, Hanhe Lin, Xu Tian, Yi Pan, Jin Liu
2023 B conf
QoMEX
Guangan Chen, Hanhe Lin, Oliver Wiedemann, Dietmar Saupe
2023 J jnl
CoRR
Guangan Chen, Hanhe Lin, Oliver Wiedemann, Dietmar Saupe
2023 J jnl
CoRR
Junbin Mao, Jin Liu, Hanhe Lin, Hulin Kuang, Shirui Pan, Yi Pan
2023 conf
BICS
Yijun Yan, Yinhe Li, Hanhe Lin, Md. Mostafa Kamal Sarker, Jinchang Ren, John McCall
2022 B conf
QoMEX
Hanhe Lin, Hui Men, Yijun Yan, Jinchang Ren, Dietmar Saupe
2022 J jnl
CoRR
Shaolin Su, Hanhe Lin, Vlad Hosu, Oliver Wiedemann, Jinqiu Sun, Yu Zhu, Hantao Liu, Yanning Zhang, Dietmar Saupe
2022 J jnl
IEEE Trans. Circuits Syst. Video Technol.
Hanhe Lin, Guangan Chen, Mohsen Jenadeleh, Vlad Hosu, Ulf-Dietrich Reips, Raouf Hamzaoui, Dietmar Saupe
2022 B conf
ICIP
Jianxun Lou, Hanhe Lin, David Marshall, Richard D. White, Young Yang, Susan Cheng Shelmerdine, Hantao Liu
2022 J jnl
Neurocomputing
Jianxun Lou, Hanhe Lin, David Marshall, Dietmar Saupe, Hantao Liu
2021 A conf
BMVC
Shaolin Su, Vlad Hosu, Hanhe Lin, Yanning Zhang, Dietmar Saupe
2021 J jnl
IEEE Access
Franz Götz-Hahn, Vlad Hosu, Hanhe Lin, Dietmar Saupe
2021 B conf
ICIP
Hanhe Lin, Guangan Chen, Felix Wilhelm Siebert
2021 J jnl
IEEE Access
Hui Men, Hanhe Lin, Mohsen Jenadeleh, Dietmar Saupe
2021 J jnl
CoRR
Hui Men, Hanhe Lin, Mohsen Jenadeleh, Dietmar Saupe
2021 J jnl
CoRR
Jianxun Lou, Hanhe Lin, David Marshall, Dietmar Saupe, Hantao Liu
2020 B conf
ICIP
Xin Zhao, Hanhe Lin, Pengfei Guo, Dietmar Saupe, Hantao Liu
2020 J jnl
CoRR
Hanhe Lin, Vlad Hosu, Dietmar Saupe
2020 conf
ACCV (4)
Baptiste Rozière, Fabien Teytaud, Vlad Hosu, Hanhe Lin, Jérémy Rapin, Mariia Zameshina, Olivier Teytaud
2020 J jnl
CoRR
Baptiste Rozière, Fabien Teytaud, Vlad Hosu, Hanhe Lin, Jérémy Rapin, Mariia Zameshina, Olivier Teytaud
2020 conf
GECCO Companion
Baptiste Rozière, Nathanaël Carraz Rakotonirina, Vlad Hosu, Hanhe Lin, Andry Rasoanaivo, Olivier Teytaud, Camille Couprie
2020 B conf
QoMEX
Oliver Wiedemann, Vlad Hosu, Hanhe Lin, Dietmar Saupe
2020 J jnl
IEEE Access
Hanhe Lin, Jeremiah D. Deng, Deike Albers, Felix Wilhelm Siebert
2020 J jnl
IEEE Trans. Image Process.
Vlad Hosu, Hanhe Lin, Tamás Szirányi, Dietmar Saupe
2020 J jnl
CoRR
Hanhe Lin, Vlad Hosu, Chunling Fan, Yun Zhang, Yuchen Mu, Raouf Hamzaoui, Dietmar Saupe
2020 J jnl
Qual. User Exp.
Hanhe Lin, Vlad Hosu, Chunling Fan, Yun Zhang, Yuchen Mu, Raouf Hamzaoui, Dietmar Saupe
2020 J jnl
CoRR
Hui Men, Vlad Hosu, Hanhe Lin, Andrés Bruhn, Dietmar Saupe
2020 conf
ICME Workshops
Hanhe Lin, Mohsen Jenadeleh, Guangan Chen, Ulf-Dietrich Reips, Raouf Hamzaoui, Dietmar Saupe
2020 J jnl
Qual. User Exp.
Hui Men, Vlad Hosu, Hanhe Lin, Andrés Bruhn, Dietmar Saupe
2020 B conf
ICPR
Baptiste Rozière, Nathanaël Carraz Rakotonirina, Vlad Hosu, Andry Rasoanaivo, Hanhe Lin, Camille Couprie, Olivier Teytaud
2020 J jnl
CoRR
Baptiste Rozière, Nathanaël Carraz Rakotonirina, Vlad Hosu, Andry Rasoanaivo, Hanhe Lin, Camille Couprie, Olivier Teytaud
2020 B conf
QoMEX
Hui Men, Vlad Hosu, Hanhe Lin, Andrés Bruhn, Dietmar Saupe
2019 J jnl
CoRR
Markus Wagner, Hanhe Lin, Shujun Li, Dietmar Saupe
2019 J jnl
CoRR
Felix Wilhelm Siebert, Hanhe Lin
2019 B conf
QoMEX
Hanhe Lin, Vlad Hosu, Dietmar Saupe
2019 J jnl
CoRR
Vlad Hosu, Hanhe Lin, Tamás Szirányi, Dietmar Saupe
2019 J jnl
CoRR
Franz Götz-Hahn, Vlad Hosu, Hanhe Lin, Dietmar Saupe
2019 B conf
QoMEX
Chunling Fan, Hanhe Lin, Vlad Hosu, Yun Zhang, Qingshan Jiang, Raouf Hamzaoui, Dietmar Saupe
2019 J jnl
CoRR
Hui Men, Hanhe Lin, Vlad Hosu, Daniel Maurer, Andrés Bruhn, Dietmar Saupe
2019 B conf
QoMEX
Hui Men, Hanhe Lin, Vlad Hosu, Daniel Maurer, Andrés Bruhn, Dietmar Saupe
2018 B conf
QoMEX
Oliver Wiedemann, Vlad Hosu, Hanhe Lin, Dietmar Saupe
2018 B conf
QoMEX
Vlad Hosu, Hanhe Lin, Dietmar Saupe
2018 J jnl
CoRR
Hanhe Lin, Vlad Hosu, Dietmar Saupe
2018 B conf
QoMEX
Hui Men, Hanhe Lin, Dietmar Saupe
2017 conf
PAKDD (Workshops)
Ahmad Shahi, Brendon J. Woodford, Hanhe Lin
2017 B conf
QoMEX
Hui Men, Hanhe Lin, Dietmar Saupe
2017 B conf
QoMEX
Vlad Hosu, Franz Hahn, Mohsen Jenadeleh, Hanhe Lin, Hui Men, Tamás Szirányi, Shujun Li, Dietmar Saupe
2016 A* conf
ACM Multimedia
Hanhe Lin, Jeremiah D. Deng, Brendon J. Woodford, Ahmad Shahi
2016 conf
PAKDD (1)
Hanhe Lin, Jeremiah D. Deng, Brendon J. Woodford
2015 B conf
ICIP
Hanhe Lin, Jeremiah D. Deng, Brendon J. Woodford
2014 conf
MLSDA@PRICAI
Hanhe Lin, Jeremiah D. Deng, Brendon J. Woodford
2013 conf
Australasian Conference on Artificial Intelligence
Hanhe Lin, Jeremiah D. Deng, Brendon J. Woodford
2012 Misc conf
IVCNZ
Hanhe Lin, Jeremiah D. Deng, Brendon J. Woodford
tests/unit/test_decompile_utils.py
← Index tests/unit/test_decompile_utils.py python
"""Unit tests for decompiler utility modules:
- bninja/utils/hashes.py
- bninja/utils/json_encoder.py
- bninja/analysis/low_level_normalization.py
"""
import hashlib
import json
import pytest


# ============================================================================
# 1a. hashes.py
# ============================================================================

from redb.extractors.decompiler.bninja.utils.hashes import (
    calculate_md5,
    calculate_sha256,
    calculate_tlsh,
)


class TestCalculateMD5:
    def test_calculate_md5_known_value(self):
        expected = hashlib.md5(b"test").hexdigest()
        assert calculate_md5("test") == expected

    def test_calculate_md5_empty(self):
        expected = hashlib.md5(b"").hexdigest()
        assert calculate_md5("") == expected


class TestCalculateSHA256:
    def test_calculate_sha256_known_value(self):
        expected = hashlib.sha256(b"hello world").hexdigest()
        assert calculate_sha256("hello world") == expected

    def test_calculate_sha256_empty_string(self):
        result = calculate_sha256("")
        assert len(result) == 64
        assert all(c in "0123456789abcdef" for c in result)


class TestCalculateTLSH:
    def test_calculate_tlsh_long_data(self):
        # TLSH requires >= 50 bytes
        data = "A" * 100
        result = calculate_tlsh(data)
        assert result is not None
        assert isinstance(result, str)

    def test_calculate_tlsh_short_data(self):
        data = "A" * 10
        result = calculate_tlsh(data)
        assert result is None

    def test_calculate_tlsh_deterministic(self):
        data = "x" * 200
        assert calculate_tlsh(data) == calculate_tlsh(data)



# ============================================================================
# 1b. json_encoder.py
# ============================================================================

from redb.extractors.decompiler.bninja.utils.json_encoder import BinaryNinjaEncoder


class TestBinaryNinjaEncoder:
    def test_encode_value_confidence_object(self):
        obj = type("VC", (), {"value": 42, "confidence": 255})()
        result = json.dumps(obj, cls=BinaryNinjaEncoder)
        assert json.loads(result) == 42

    def test_encode_str_fallback(self):
        obj = type("Obj", (), {"__str__": lambda self: "custom_repr"})()
        result = json.dumps(obj, cls=BinaryNinjaEncoder)
        assert json.loads(result) == "custom_repr"

    def test_encode_normal_types(self):
        data = {"a": 1, "b": [2, 3], "c": "hello"}
        result = json.dumps(data, cls=BinaryNinjaEncoder)
        assert json.loads(result) == data

    def test_encode_set_via_str(self):
        # Python sets have __str__, so BinaryNinjaEncoder converts them
        # to their string repr instead of raising TypeError.
        result = json.dumps(set([1, 2, 3]), cls=BinaryNinjaEncoder)
        parsed = json.loads(result)
        assert isinstance(parsed, str)
        assert "1" in parsed


# ============================================================================
# 1c. low_level_normalization.py
# ============================================================================

from redb.extractors.decompiler.bninja.analysis.low_level_normalization import (
    LowLevelNormalization,
)


class MockIL:
    """Mock IL node for normalization tests."""
    def __init__(self, operation, operands=None):
        self.operation = operation
        self.operands = operands or []


class TestLowLevelNormalization:
    def setup_method(self):
        self.normalizer = LowLevelNormalization()

    def test_normalize_single_instruction(self):
        node = MockIL(operation=5)
        result = self.normalizer.normalize_instruction_all_levels(node)
        assert result == [5]

    def test_normalize_nested_operands(self):
        child1 = MockIL(operation=10)
        child2 = MockIL(operation=20)
        root = MockIL(operation=1, operands=[child1, child2])
        result = self.normalizer.normalize_instruction_all_levels(root)
        assert result == [1, 10, 20]

    def test_normalize_empty_operands(self):
        node = MockIL(operation=42, operands=[])
        result = self.normalizer.normalize_instruction_all_levels(node)
        assert result == [42]

    def test_normalize_list_operands(self):
        # Simulates phi-node style list operands
        inner = MockIL(operation=99)
        node = MockIL(operation=7, operands=[[inner]])
        result = self.normalizer.normalize_instruction_all_levels(node)
        assert result == [7, 99]

    def test_normalize_none_input(self):
        result = self.normalizer.normalize_instruction_all_levels(None)
        assert result == []