def METHOD_NAME(old_name: str) -> str:
    matches = regex.match(old_name)
    if not matches:
        return None
    post_id = int(matches.group(1))
    post_ext = matches.group(2)
    return "%d_%s.%s" % (
        post_id,
        postfuncs.get_post_security_hash(post_id),
        post_ext,
    )