Code covered by the BSD License

# Encryption/Coding and Minimzing Data

### Mohammed Siddeq (view profile)

this program used in the Encryption/Coding and Minimize array size at the same.

[New_arr]=Decryption_Deoding_Minimized_Array_Algorithm(Key1,Table,EncryptedData)
```function [New_arr]=Decryption_Deoding_Minimized_Array_Algorithm(Key1,Table,EncryptedData)
% this function is designed by
% Mohammed M. Siddeq
%date :- 12 - NOV.- 2011
%-----------------------------------
%Decryption / Deoding for Minimized data
% This function is used to estimates  3 data from Encrypted data
% Example\ input :- EncryptedData=[-13221.9,39840,4422.2,0.3];
%          input :- Key1=[0.1 , 22, 4422];
%          input Table=[1 2 -3 200 9 0 3]; %% it is represents Probability of data..(Second Key)
%
% output New_arr=[1,2,-3,200,1,9,2,0,1,3,0,0];
% See function "Key_generater()"
% See function "Encryption_Coding_Minimize_Array_Algorithm()"
% Note\ may be you will find some zeros at the end of the estimated array (New_arr)
%       and this is because, at the of the Encryption or codiing algorithm padded
%       zeros automatically.
%----------------------------------- Decryption / Coding working........
'wait.....'
'Original data Decoded..OK..'
S_Enc=size(EncryptedData);L=1;
for i=1:S_Enc(2)
S_Table=size(Table);
%'find exact values...'
Flage=1;Est=0;
T(1:3)=0;S1=1; S2=1; S3=1;
while (Flage==1)
Est=0;
T(1)=Table(S1); T(2)=Table(S2);T(3)=Table(S3);
for k2=1:3 Est=Est+(T(k2).*Key1(k2)); end;
if (Est==EncryptedData(i)) Flage=0;
else
S1=S1+1;
if (S1>S_Table(2)) S2=S2+1; S1=1; end;
if (S2>S_Table(2)) S3=S3+1; S2=1; end;
if (S3>S_Table(2)) S3=1; end;
end;
end;
New_arr(L:L+2)=T(1:3);
L=L+3;
end;
end```