Info
この質問は閉じられています。 編集または回答するには再度開いてください。
I am getting error as " Too many input arguments" i am trying develop an optimized algorithm using the 6 prime numbers to generate encryption
1 回表示 (過去 30 日間)
古いコメントを表示
clc;
disp('Implementation of RSA Algorithm');
clear all; close all;
p = input('\nEnter the value of p: ');
q = input('\nEnter the value of q: ');
r = input('\nEnter the value of r: ');
s = input('\nEnter the value of s: ');
t = input('\nEnter the value of t: ');
u = input('\nEnter the value of u: ');
[Pk,Phi,d,e] = intialize(p,q,r,s,t,u);
M = input('\nEnter the message: ','s');
x=length(M);
c=0;
for j= 1:x
for i=0:122
if strcmp(M(j),char(i))
c(j)=i;
end
end
end
disp('ASCII Code of the entered Message:');
disp(c);
% % %Encryption
h = cputime;
for j= 1:x
cipher(j)= crypt(c(j),Pk,e);
end
disp('Cipher Text of the entered Message:');
disp(cipher);
encrypt_time = cputime-h
% % %Decryption
v = cputime;
for j= 1:x
message (j)= crypt(cipher(j),Pk,d);
end
disp('Decrypted ASCII of Message:');
disp(message);
decrypt_time = cputime-v
disp(['Decrypted Message is: ' message]);
2 件のコメント
Jan
2016 年 3 月 6 日
Please post the complete error message, such that we do not have to guess, which line causes the problem.
回答 (1 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!