C/C++ :: Write A Code That Can Crack The Sha256?

Mar 28, 2015

is it possible to write a code that can crack the sha256 hash when you know the form of password? for example the password form is *-********** which is 12-13 characters long and the first char is one number from 1 to 25, second one is hyphen and in each char from the third one to the end, you can put a...z, A...Z and 0...9 and after guessing each pass, the code convert the pass to sha256 and see whether the result hash is equal to our hash or not and then print the correct pass. I know all possible numbers is a big number ((26+26+10)^10) but I want to know that: 1- Is it possible to write such code? 2-if yes, is it possible to run whole code in less than one day(because I think it takes a lot of time to complete the whole code)? 3-Since I can't ask you to write a code for me, how and where can I ask for this code? 4-if no, is it possible to write such code in other programming languages?

View 2 Replies


ADVERTISEMENT

C/C++ :: Convert Sha256 To Base64?

Mar 28, 2015

I have seen a code in one site which could convert sha256 hash to base64 with C language but when I tested it, it didn't work at that time so I ignored. I need it now but unfortunately I can't find it through the net anymore. I want to ask if there is such code in C or other languages that can convert sha256 hash to base64?

View 1 Replies View Related

C++ :: Generate A Sha256 Hash With Std String?

May 22, 2013

I am trying to generate a sha256 hash with std string, but i can't get this incomplete code puzzle to work [URL] .....

void main() {
string pbData1 = "HELLO";
BYTE* pbOutputBuffer;
CryptoPP::SHA256().CalculateDigest(pbOutputBuffer, (byte*)pbData1.c_str(), pbData1.size());
cout << pbOutputBuffer;
}

my problem is converting 'const char *' to 'const byte *' ..etc

View 1 Replies View Related

C :: Write A Code To Calculate Minimum Number

May 24, 2014

I'm trying to write a code to calculate the minimum number of coins needed to cover a change. It works fine but i want to display a message telling the user to try again if they type something that's not a number or a negative number. But it's not working. When i type a negative number, the program runs normally and displays a negative value of coins instead of showing the message. And when i type something that's not a number, the program just keeps showing a lot of zeros nonstop. And when i try to compile it with 'unsigned float' instead of just 'float' i get errors.

Code:

#include <stdio.h>
int main()
{
unsigned int coins;
float change;
unsigned int n25, n10, n5, n1;
unsigned int r25, r10, r5;
}

[code]....

View 7 Replies View Related

C :: Write A Code About Caesar Cipher Shift And Using ASCII With It

Dec 5, 2014

I am struggling to write a code about caesar cipher shift and using ascii code with it. For example letter b should be replaced with the letter c and using the ascii code it should be from 98 to 99 and so on..

View 1 Replies View Related

C :: Write A Code To Find All The Prime Numbers Before A User Entered Number

Apr 9, 2014

I am trying to write code to find all the prime numbers before a user entered number. I started with a working program and when I tried to create a function, it got all messed up.

Code:

#include <stdio.h>
int is_prime( int num );
int get_positive_integer(void);
int main( ) {
int upper; /* upper limit to check */
int num; /* current number to check */
int isprime;
/* used to flag if number is prime or not */

[Code]...

It says the error is on line 23

View 6 Replies View Related

C++ :: Write A Source Code That Find Smallest / Largest And Average Of Numbers From Array

May 13, 2014

im trying to write a source code that find the smallest, largest and average of numbers in array. the code runs fine, but it is not giving the highest number and the the average should include only four number excluding highest and smallest number from the array.

void OlympicJudging() // Olympic Judging {
int numbers [6];
double average, sum = 0;
int temp;
for(int i = 0; i < 6; i++){
cout << "Please type a value for scores: ";
cin >> numbers[i];

[Code]...

View 5 Replies View Related

C :: Print Out - Array Code And Pseudo Code?

Apr 15, 2013

I have assignment which requires me to print out and array code and a pseudo code. I dont no what a pseudo code is,.

View 2 Replies View Related

C++ :: Reducing Code Duplication From Common Code Calling Common Class

Apr 13, 2014

I have a class 'A' which is almost perfect for my needs. Class 'B' uses class 'A' I've now designed Class 'C' and Class 'D' and noticed that there is a good chunk of code in class 'B', 'C' and 'D' for using Class 'A' is duplicated. I've separated out this code in specific, standalone functions in each of the classes. Now I'm wondering where this code should go. At the moment, the functions are duplicated in the three calling classes (B, C and D). Placing the functions into class 'A' would break the single responsibility principle. Inheritance to add functionality would likely break both SRP and LSP. The one that seems that it may work is composition.

However, Is designing a complete class just for a few functions over kill?

Would it be valid for classes 'B', 'C' and 'D' to access both the new class 'E' (which would depend on A) and the old class 'A' (which would have to be the same instance as the instance in the new class 'E'), or should the new class 'E' provide sufficient functionality so that Classes B, C and D don't need to access Class A directly? It would seem that its then an incomplete interface of the original object with additional functionality (ie, incompatible) Or should I do it a completely different way?

View 4 Replies View Related

C :: How To Write COS / TAN / SIN

Jul 25, 2013

I know I need <math.h> and I know how to write tan(10) or whatever I need. However I need angles, like 100 / tan10 = 567.13. The 10 is degrees.

I am doing a fun project now that I feel more confident. However my textbook only shows me how to use the math library and only shows a few trig functions.

I am applying Trigonometric Functions to see if a car is speeding.

View 3 Replies View Related

C :: How To Get Program To Write Itself

Aug 27, 2013

For instance Code: int counter;
counter =0;
FILE *pfile;
pfile= fopen("g:myprog.txt" "w");
while (counter >100)
{ fprintf (case counter{something})}; how do I do this?

View 11 Replies View Related

C/C++ :: Write BST To File

Nov 12, 2014

I can only write one value to file:

get all, say for example barcode
char* bst:: get_bar(hwareItem*& root){
while(root!=NULL){
get_bar(root->left);

[Code]...

gets only one value depending on traversal orderI wish to get all values of BST

View 1 Replies View Related

C++ :: Using Outfile To Write Name?

Sep 4, 2013

I am trying to display my name using outfile vs. cout and I get errors I don't know how to fix. Here is the code:

//This program will calculate the monthly payment, the total amount paid back over the entire life of the loan,
// and the total interest paid over the life of the loan.
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
int main() {
ofstream outfile;

[code]....

And here are my errors:

1>z:csci207program1practice.cpp(13): error C2297: '<<' : illegal, right operand has type 'const char [16]'
1>z:csci207program1practice.cpp(13): warning C4552: '<<' : operator has no effect; expected operator with side-effect

View 1 Replies View Related

C# :: Write Five And Convert To Int

Jun 10, 2014

i'm using TryParse to convert 5 in string to 5 int but i want to give the possibility to the user to write five not 5.

View 5 Replies View Related

C# :: Write WPF With Textbox

Mar 28, 2015

I was following a c# book to write a WPF with a textbox. When the textbox is selected(got focus) with keyboard or mouse, it will select all text in it. I followed the book and wrote this:

private void TextBox1_GotFocus(object sender, RoutedEventArgs e) {
TextBox1.SelectAll();
} private void TextBox1_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) {
var control = sender as TextBox;

[Code] ....

The book said having "e.Handled = true" is to stop the event in order to prevent the cursor being positioned on somewhere of the text instead of selecting all text. From my understanding, "e.Handled = true" is for stopping routed events. Is this means that something will run if "e.Handled = true" is not there? If yes, then what is it?

View 2 Replies View Related

C/C++ :: Using Write In A For Loop?

Sep 23, 2014

i am having some trouble with a piece of code im writing for class.

here is my code

for (j=7; j>=0; --j){
putchar((name[i] IF_STATEMENT);
write(1, " ", 1);

I am trying to use write to format my output so that it looks like this

0 0 0 0 0 0 0 0

The formatting works fine when i use printf("%s", " "); in place of write but for some reason when i use write the format comes out like this

00000000

I dont understand why this is happening. Does write always work outside of a for loop or something?

View 6 Replies View Related

C/C++ :: Why Write Return 0 At The End

Jan 22, 2013

#include <iostream.h>
#include <conio.h>
int main ()
{
cout << "Hello World";
getch();
return 0;
}  

In the above code, why is it necessary to write getch() and return 0? What is their purpose?

View 7 Replies View Related

C++ :: Write In Log File Through DLL

Apr 26, 2013

so i have this dll with a DBTProc, whenever a window gets created i want to write something in a log file. Now everytime I run it it adds three times the text in this log file, but then it does nothing anymore. I do hear a beep everytime a window get created so it doesn't actually open my file to write in

code:
LRESULT CALLBACK CBTProc(int code, WPARAM wParam, LPARAM lParam)
{
if (code < 0)
{

[Code].....

View 7 Replies View Related

C :: How To Get Scan Code Of ESC Key

Sep 17, 2014

i wrote the following code :

Code:

#include<stdio.h>#include<conio.h>
#include<stdlib.h>
int a[][4] = {15,9,10,25,6,2,4,7,32,19,42,8,21,17,18,0};
void boxes();
void display();
void main()
{int ch,r=3,c=3,t;

[Code]...

not able to esc when i press esc key.how to get rid of this.

View 4 Replies View Related

C++ :: From String To A Code

Apr 17, 2013

I wanna to know how can i get a string from the user and treat it as a c++ code ..is there any way to do that ??

View 7 Replies View Related

C++ :: How To Code AI For RTS Games

Oct 13, 2013

I want to make a RTS game but how can I code an AI for RTS games. How to do that?

View 5 Replies View Related

C++ :: How To Get Source Code From The Web

May 4, 2014

I am making a game and want to make an updater that grabs the source code from a page on the web. Can this use things that are available to all platforms? It could just be something that grabs the text from the page and executing it (maybe using something like Python's exec() command ?) BTW I'm using mac

View 1 Replies View Related

C++ :: Put Code In A Function

Feb 25, 2014

this is my code i want to put the part where i have it do multiplication and addition into functions. and then call them so that it can run the addition and multiplication. Heres my code

# include <iostream>
using namespace std;
int main(){

[Code].....

View 2 Replies View Related

C++ :: Write A Calculator Using Two Stacks

Apr 13, 2014

I just started by defining a stack class (stackDouble). I need to write a program that accepts an infix calculator expression, with the following operators (**, exponentiation, /, division, and, -, subtraction. The operator precedence is exponent, division, and subtraction.I need to use a stack of doubles and a stack of strings, of which I can write two classes, or write a single stack template. The user will input the expression just via cin, and there will be a # before every number, a ! before each operator, and a . at the end of the expression. '#', '!', or '.' can be input into a char variable, numbers into a double variable and operators into a string variable.

For example, the following would output 6:

# 3 ! / # 2 ! / # .5 ! ** # 2 .

As stated above, I already made up a stackDouble class. What would I need to do to create the other class (I don't think I want to do it with a template)?

Code:
#include <iostream>
#include <string>
using namespace std;
class stackDouble{

[code]....

View 2 Replies View Related

C :: Read / Write To File

Mar 3, 2013

How can I erase the data stored in /tmp/a.txt after every run of this code?

Code:

#include <stdio.h> // IO operations
#include <unistd.h> //for pid, ppid, fork functions
#include <sys/types.h> //for pid_t type, kill function
#include <stdlib.h> //for exit function
#include <signal.h> //for kill function
#include <sys/types.h>
#include <sys/stat.h>

[Code]...

View 3 Replies View Related

C :: How To Write Powers Without Using Math

Sep 22, 2014

How would one write 3^i without using .math? (i being numbers 0-9)

More specifically, this is what I have:

Code:

#include <stdio.h>
#include <stdlib.h>
int main(void) {
int x, n, answer1, first;
x = 3;
n = 10;
first = 1;

[Code]....

And this is what I want it to produce:

1 0 1.0
3 1 0.333333343
9 2 0.111111112
27 3 0.037037037
81 4 0.012345679
243 5 0.004115226
729 6 0.001371742
2187 7 0.000457247
6561 8 0.000152416
19683 9 0.000050805

I believe I am only having troubles with the first column,

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved