필터 지우기
필터 지우기

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
Jan 2016년 3월 6일
Please post the complete error message, such that we do not have to guess, which line causes the problem.
MAXIMUS ODOALA
MAXIMUS ODOALA 2016년 3월 6일
Error using intialize Too many input arguments.
Error in rsa (line 11) [Pk,Phi,d,e] = intialize(p,q,r,s,t,u);

답변 (1개)

Stalin Samuel
Stalin Samuel 2016년 3월 6일

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by