Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
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 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Jan
le 6 Mar 2016
Please post the complete error message, such that we do not have to guess, which line causes the problem.
Réponses (1)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!