📄 vigenere.m
字号:
function y = vigenere(txt, key);% This function performs the Vigenere cipher on the plaintext in% the variable txt, using key (we assume the key is in numerical% representation).xln=length(txt);kln=length(key);for j=1:xln, jmod=mod(j,kln); if jmod==0, jmod=kln; end; %map an index of 0 into an index of kln y(j)=shift(txt(j),key(jmod));end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -