Skip to content

harryzz/simatic-s7-2xx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

simatic-s7-2xx

int decodeS72xx(unsigned char* data, int len) {
    unsigned char c = 0xaa;
    unsigned char p0=0;
    unsigned char p1=0;
    for(int i=0; i<len; i++) {
        unsigned char x = data[i];
        if(i%2) {
            data[i]^=(p0^c);
            p0 = x;
        } else {
            data[i]^=(p1^c);
            p1 = x;
        }
    }
    return 0;
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published