reveal.m

来自「vigenere密码解密的matlab实现」· M 代码 · 共 18 行

M
18
字号
function rcards = reveal(shval,k,p)% This function reveals the cards whose values are passed% in the vector shval. The hiding operation took place by taking % the card values and raising them to the kth power mod pcln=length(shval);kinv=powermod(k,-1,p-1);revvals=zeros(cln,1);for j=1:cln,   revvals(j)=powermod(shval(j),kinv,p);   rcards(j,:)=int2text1(revvals(j));end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?