?? addsub.cpp
字號:
// Created:12-14-98
// By Jeff Connelly
// ADD/SUB encryption
// Adds or subtracts the password with the data, developed by me
#include "stdafx.h"
#define EXPORTING
#include "comprlib.h"
#include "addsub.h"
// Encrypt using ADD/SUB
void EXPORT addsub_encode(char* pw)
{
register char c;
register int i = 0;
register int pwlen = strlen(pw);
while (!end_of_data())
{
c = read_byte();
// Note: 'c' might wrap around, this is not a bug
write_byte(c + pw[i % pwlen]);
++i;
}
}
// Decode using ADD/SUB
void EXPORT addsub_decode(char* pw)
{
register char c;
register int i = 0;
register int pwlen = strlen(pw);
while (!end_of_data())
{
c = read_byte();
write_byte(c - pw[i % pwlen]);
++i;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -