文件名称:matlab加密代码-Vigenere-Cipher:Vigenere密码加密的MATLAB代码
文件大小:672B
文件格式:ZIP
更新时间:2024-06-15 19:19:57
系统开源
matlab加密代码Vigenere密码 #MATLAB Vigenere密码加密代码 #定义vigenere函数函数cipher_text = vigenere(p_text,key)p_lower = lower(p_text); k_lower = lower(key); p =字符(p_lower); k =字符(k_lower); p = p(查找(〜isspace(p))); k = k(查找(〜isspace(k))); k1 = k; while(length(k1)<length(p))k1 = strcat(k1,k); 结束k2 = k1(1:length(p)); c = zeros(1,length(p)); 对于i = 1:length(c)c(i)= double(p(i))+ double(k2(i))-194; 结束c1 = mod(c,26)+97; cipher_text = upper(char(c1)); 结尾 #调用vigenere密码函数vigenere('MEET ME LATER','LEMON');
【文件预览】:
Vigenere-Cipher-master
----README.md(552B)