gchq/CyberChef

manchester encoding / decoding

Open

#1,104 创建于 2020年9月18日

在 GitHub 查看
 (4 评论) (0 反应) (1 负责人)JavaScript (3,944 fork)batch import
featurehelp wantedoperation

仓库指标

Star
 (34,843 star)
PR 合并指标
 (平均合并 57天 13小时) (30 天内合并 62 个 PR)

描述

manchester encoding (also known as phase encoding) is commonly used with telecommunications and data storage and would be a useful filter in CyberChef, particularly when working with SDR (software defined radio) sourced data

In short to encode, a input value of 1 becomes 01 and a input value of 0 becomes 10

encode(input) {

    foreach bit in input {
        if bit == 0 {
            output.append(1);
            output.append(0);
        } else {
            output.append(0);
            output.append(1);
        }

    return output;
}

贡献者指南