![]() |
A52HackTool 1.3.0
Turnkey & easy to use tool for cracking the GSM A5/2 cipher
|
Utilitary tools. More...
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include "utils.h"
Functions | |
int | stringToByteArray (char *s, byte a[], unsigned int len) |
Translates a string composed of "0"s or "1"s into a byte array. | |
int | fileExists (const char *filename) |
Checks the accessibility of a file for reading. | |
long long | timeval_diff (struct timeval *difference, struct timeval *end_time, struct timeval *start_time) |
Computes the difference between two time values. |
Utilitary tools.
int fileExists | ( | const char * | filename | ) |
Checks the accessibility of a file for reading.
[in] | filename | Path of the file to test |
Referenced by main().
int stringToByteArray | ( | char * | s, |
byte | a[], | ||
unsigned int | len | ||
) |
Translates a string composed of "0"s or "1"s into a byte array.
[in] | s | Input string |
[out] | a | Array to construct |
[in] | len | Length of the string |
Referenced by main().
long long timeval_diff | ( | struct timeval * | difference, |
struct timeval * | end_time, | ||
struct timeval * | start_time | ||
) |
Computes the difference between two time values.
[out] | difference | Processed difference |
[in] | end_time | End time |
[in] | start_time | Start time |