HOME

Friday, May 26, 2017

Vendora Encryption (public prototyped version) advanced not for public. For Password authentication

/*--------->copy wrights @ www.wetheprogrammer.blogspot.in,@www.hackersonlineclub.com
@www.codechef.com, @nimbus soft tech
vendora_encryption for passwords
proto type in c++.
other prototypes in c,vb.net,php,and java in more complex format are available not shareable
unless with full publicity written and signed approval
Author : Ameer tataroo Ameer ( Abdulkadir Salihu Tataru )
<-------------------*/
#include <conio.h>//getch()     function
#include <iomanip> //setw() function
#include <iostream>// cout,cin functions required
#include <windows.h>//system("cls") function
#include <iterator> //for iterative reversing and sorting
#include <string>//for string function
#include <algorithm> //for the sort and rev functions
#define  Max 10 //define key for encryption
#include <cstdio>
#include <stdlib.h>//for random character
using namespace std;
void getValue();
class Password
{
int begining, center , ending;
 string s,s1;
 int key=Max, recur=0;
public:
        void Pass_sort(string pass)
{
// sorting of the password characters starts here
 s  = s1=   pass;
 if(cout<<"\n pass word before sorting "<<setw(15)<<s<<endl){// this will print the password as it's given, without sorting or reversing.
sort(s.begin(), s.end());
cout <<"\n this is what the password will look like after sorting "<<setw(20)<<s<< endl;
}
EncryptPass(s);
}
//function that holds the hash value
void EncryptPass(string sort_Pass)
{
//reversing the value till Max time (Max is pre-processor) which i defined in above as global is the key for the encryption
int i=0;
 if(cout<<" encrypting the value to be saved with "<<(sizeof(Max)*sizeof(sort_Pass))*8<<" bit "<< endl)
  {
       std::reverse_iterator<std::string::iterator> r =  sort_Pass.rbegin();
       while (i <key) {
            r [0]='^';// i am replacing the very first value in the string to ^
            r [2] = rand();//random character replaces what ever value is at 2nd position, on console 3rd position
          //r [6] = rand();
  std::string rev(r,   sort_Pass.rend());
   s1=rev;
 i++;
  }
  func_analys("hashed value");
  system("cls");
   std::cout << setw(25)<<" hashed value to be saved in db in  implementation don't  show  this\n you can not down this value  & run again give,\n   the same pass and compare the  new  hashed     value \n:" <<"\n"<<  s1 << '\n';

         }
}
void func_analys(string p)
{
    int i,j,k,a=0;
    cout<<"\n\n\n  please wait analyzing \n     "<<setw(20)<< p;
delay : for (i=0;i<100;i++)   //time delay loops 1-3
        for(j=0;j<100;j++)
            for(k=0;k<14000;k++)
            ;
        a++;
        if(a<25)
        {
            char c=177;
            cout <<c;
            goto delay;
        }
}
};

int main()
{
    Password p;
    string pass,  *temp;
  char arr[10],password[15] ,ch;int i =0 ,counter=0;
       if(cout<<" Password Not More than  10  or less than 3 char. and no space (i.e hackers or hackers_@3) :"<<setw(15))
  {
        cin>> pass;
  cout<<"\n\n given pass :  ";
    cout<<pass;
    }
       //swapping the index of the given string before passing it for sorting and encrypting
  for (i=0;i<sizeof(pass) ;i++)
  {
arr[i]= pass[i];
    pass[i] = pass[i+1];
   pass[i+1]=arr[i];
      cout <<"\n Iterator_encrypt " <<i<<setw(20)<<pass;
  }
  p.Pass_sort(pass);


}

No comments:

Post a Comment