Magnus Rosell

16 papers B 2Misc 1Journal 1Unranked 11
YearRankTypeTitle / Venue / Authors
2020 J jnl
Decis. Support Syst.
Marianela García Lozano, Joel Brynielsson, Ulrik Franke, Magnus Rosell, Edward Tjörnhammar, Stefan Varga, Vladimir Vlassov
2018 conf
SemEval@NAACL-HLT
Maja Karasalo, Mattias Nilsson, Magnus Rosell, Ulrika Wickenberg Bolin
2015 conf
ENIC
Christopher Teljstedt, Magnus Rosell, Fredrik Johansson
2015 conf
MFI
Ronnie Johansson, Andreas Horndahl, Magnus Rosell
2015 conf
ENIC
David Trang, Fredrik Johansson, Magnus Rosell
2015 conf
BigData Congress
Marianela García Lozano, Ulrik Franke, Magnus Rosell, Vladimir Vlassov
2014 conf
FiCloud
Ulrik Franke, Magnus Rosell
2011 conf
EISIC
Fredrik Johansson, Joel Brynielsson, Pontus Hörling, Michael Malm, Christian Mårtenson, Staffan Truvé, Magnus Rosell
2010 conf
IceTAL
Hercules Dalianis, Magnus Rosell, Eriks Sneiders
2010 B conf
LREC
Magnus Rosell
2009 Misc conf
RANLP
Magnus Rosell, Martin Hassel, Viggo Kann
2009 conf
NODALIDA
Magnus Rosell
2009
Magnus Rosell
2008 B conf
LREC
Magnus Rosell, Sumithra Velupillai
2005 conf
NODALIDA
Viggo Kann, Magnus Rosell
2005 conf
NODALIDA
Magnus Rosell, Sumithra Velupillai
redb/extractors/decompiler/bninja/utils/hashes.py
← Index redb/extractors/decompiler/bninja/utils/hashes.py python
import hashlib

import tlsh


def calculate_md5(input_str):
    return hashlib.md5(input_str.encode("utf-8")).hexdigest()


def calculate_sha256(input_str):
    """Calculate SHA256 hash of a string."""
    return hashlib.sha256(input_str.encode("utf-8")).hexdigest()

def calculate_tlsh(data):
    """Calculate TLSH fuzzy hash of data if available.

    Args:
        data: The string data to calculate the hash for

    Returns:
        The TLSH hash as a string, or None if not available

    Note:
        TLSH requires at least 50 bytes of data to generate a hash
    """
    try:
        if len(data) >= 50:
            return tlsh.hash(data.encode("utf-8"))
    except Exception:
        pass
    return None