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!