Thread: Hybrid Password

  1. #1
    Registered User
    Join Date
    Mar 2019
    Posts
    6

    Hybrid Password

    Hello guys password in my code must escape the hacker.I tried to do something with swap but I couldn't make the loop.Could you help please?




    Code:
    #include <stdio.h>
    
    
    void swap(int *value,int*Hybridized_Password){
    	int swap_operand =*value;
    	*value =*Hybridized_Password;
    	*Hybridized_Password = swap_operand;
    }
    int main()
    {
    	int a=1111
    	int password[4] ={9999};
    	printf("\nBefore Swapping Hybridization:a=%d & password[0]=%d\n",a,password[0]);
    	
    	swap(%a,&password[0]); // a and default password go swap function
    	
    printf("\nAfter Swapping Hybridization:a=%d &password[0]=%d\n",a, password[0]);
    }

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,066
    How does it not work, and what does this "hybrid password" have to do with anything?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2019
    Posts
    6
    This is the only hybridization part.I have to set loop of it but I could not

  4. #4
    Registered User
    Join Date
    Mar 2019
    Posts
    6
    the letters will escape to the farthest values ​​with ascii code.
    Example my password abcd.For example my password is ABCD. if the hacker approaches my password, thanks to ascii code will be missed Will be 9876

  5. #5
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,859
    So... Just to clarify...

    A - > 9
    B - > 8
    C - > 7
    D - > 6
    E - > 5?
    ...
    J - > ?

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,412
    Cross-posted here -> Hybrid password - C++ Forum
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    Registered User
    Join Date
    May 2012
    Location
    Arizona, USA
    Posts
    653
    I can't be the only one scratching my head on this one.

    Can you explain what you mean by each the following statements in your description?

    • "the letters will escape": how does a letter "escape"? What is it escaping?
    • "to the farthest values with ascii code": what is the "farthest value", and how are you expecting to use ASCII to achieve this?
    • "if the hacker approaches my password": how does a hacker "approach" your password? What does that even mean?
    • "thanks to ascii code will be missed": how will the password be "missed"?
    • How do you get "9876" from "ABCD" (or is it "abcd")?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 06-29-2014, 02:08 AM
  2. hybrid quick sort
    By Faiza Iqbal in forum C++ Programming
    Replies: 6
    Last Post: 03-12-2010, 10:58 AM
  3. Hybrid ADT Problem
    By cpp_is_fun in forum C++ Programming
    Replies: 1
    Last Post: 11-18-2005, 09:40 AM
  4. MS building PC/Xbox hybrid?
    By Perspective in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 06-01-2004, 07:17 PM

Tags for this Thread