Buscar este blog

miércoles, 20 de febrero de 2013

Mutant Encryption Algorithm

Today's project is more about the same topic of encrypting passwords.This piece of code is aimed to encrypt passwords, but this time it won't return a single character array, but a constantly-changing matrix which contains the password. I am currently working on the decrypting algorithm, which I'm done so far with. As you may deduce from the code, what I do is 'insert' the password character by character into the matrix following this order:

  • First element will go in row 0 and a random column between 13 and 36
  • Second element will go in row 1 and a random column between 13 and 36
                                                                  .
                                                                  .
                                                                  .
                                                                  .
                                                                  .
  • 'n' element will go in row n-1 and a random column between 13 and 36
Here I attach the file, as always:


And here I show the code, which is really simple:


jueves, 7 de febrero de 2013

Test-Type Exam Correction With Java

Hello everyone!

Today's little project is a simple way of correcting tests with Java. In this piece of code I just defined two possible models or answers, they're all random, but the only thing needed is to update them with valid answers. The length of the test? I just did it for a 10-question test, but it can naturally be extended to the number of answers the teacher may want.

Here's a snapshot:

And the code:


miércoles, 6 de febrero de 2013

A simple function that hides typed passwords in C++

In C++ console there's no way of hiding passwords at the same time we type them (I mean, our password remains visible for everyone who may sit next to us). There's a simple way to avoid this that resembles to what can be easily made in HTML or JavaScript: simply adding a cls command to clear all the console output until that moment and then popping up the same stuff but now with '*' instead.

Code:

sábado, 2 de febrero de 2013

Password-Decryption with C++

Hi there!
I just finished the second and last part of my little project called Encrypting&Decrypting Passwords with C++. What I show you today is the other part of the code: how to get the real password from a senseless and non-intuitive string, previously encrypted by the first program. As you may know, there are millions of ways of encrypting stuff like passwords, texts, phone numbers...strings in general. Here I show you what first came to my mind. The current program asks the user to type the encrypted password, and it recognizes whether it went through the simple-mode or advanced-mode encryption way. And that's it, it gives back the original password.

 Here are a couple of snapshots, where user chose simple-mode and the result was a string with just numbers:



and user chose advanced-mode ant the result was a string with weird characters:



Here is the file located on my Skydrive account:


And here is the code: