第八周 字串加密

2021-07-06 08:50:57 字數 741 閱讀 6665

/*

檔名稱:專案.cbp

作 者:紀冬雪完成日期:2023年11月1日

版 本 號:v1.0

問題描述:乙個文字串可用事先編制好的字元對映表進行加密。例如,設字元對映表為:

abcdefghijklmnopqrstuvwxyz

ngzqtcobmuhelkpdawxfyivrsj

則字串「lao he jiao shu ju jie gou」被加密為「enp bt umnp xby uy umt opy」。

設計乙個程式,實現加密、解密演算法,將輸入的文字進行加密後輸出,然後進行解密並輸出。

輸入描述:無

程式輸出:測試資料

*/

sqstring encrypt(sqstring p)

q.length=p.length;

return q;

}sqstring unencrypt(sqstring q)

p.length=q.length;

return p;

}

#include #include "sqstring.h"

int main()

執行結果:

第八周 字串加密

all right reserved.date 2015年10月20日 版本 v1.0.1 作業系統 xp 執行環境 vc6.0 問題描述 乙個文字串可用事先編制好的字元對映表進行加密。例如,設字元對映表為 abcdefghijklmnopqrstuvwxyz ngzqtcobmuhelkpdawx...

第八周 字元加密

作 者 孫子策 完成日期 2016.10.20 問題描述 乙個文字串可用事先編制好的字元對映表進行加密。例如,設字元對映表為 abcdefghijklmnopqrstuvwxyz ngzqtcobmuhelkpdawxfyivrsj 輸入描述 串的輸入。程式輸出 加密後的輸出。演算法 sqstrin...

第八周 專案4 字串加密

檔名稱 main.cpp 作者 王超 完成日期 2015年10月23日 問題描述 字串加密 include include sqstring.h sqstring a,b 用於儲存字元對映表 sqstring encrypt sqstring p q.length p.length return q...