static void init(struct fmt_main *self) { assert(sizeof(hccap_t) == HCCAP_SIZE); ///Alocate memory for hashes and passwords inbuffer = (wpapsk_password *) malloc(sizeof(wpapsk_password) * MAX_KEYS_PER_CRYPT); outbuffer = (wpapsk_hash *) malloc(sizeof(wpapsk_hash) * MAX_KEYS_PER_CRYPT); check_mem_allocation(inbuffer, outbuffer); mic = (mic_t *) malloc(sizeof(mic_t) * MAX_KEYS_PER_CRYPT); atexit(cleanup); /* * Zeroize the lengths in case crypt_all() is called with some keys still * not set. This may happen during self-tests. */ { int i; for (i = 0; i < self->params.max_keys_per_crypt; i++) inbuffer[i].length = 0; } ///Initialize CUDA cuda_init(cuda_gpu_id); }
static void init(struct fmt_main *self) { //Allocate memory for hashes and passwords inbuffer=(crypt_sha256_password*)mem_calloc(MAX_KEYS_PER_CRYPT*sizeof(crypt_sha256_password)); outbuffer=(uint32_t*)mem_alloc(MAX_KEYS_PER_CRYPT*sizeof(uint32_t)*8); check_mem_allocation(inbuffer,outbuffer); //Initialize CUDA cuda_init(cuda_gpu_id); }
static void init(struct fmt_main *self) { //Allocate memory for hashes and passwords inbuffer = (mscash2_password *) mem_calloc(MAX_KEYS_PER_CRYPT*sizeof(mscash2_password)); outbuffer = (mscash2_hash *) mem_alloc(MAX_KEYS_PER_CRYPT*sizeof(mscash2_hash)); check_mem_allocation(inbuffer, outbuffer); //Initialize CUDA cuda_init(cuda_gpu_id); }
static void init(struct fmt_main *self) { ///Alocate memory for hashes and passwords inbuffer = (uint8_t *) calloc(MAX_KEYS_PER_CRYPT, sizeof(phpass_password)); outbuffer = (phpass_crack *) calloc(MAX_KEYS_PER_CRYPT, sizeof(phpass_crack)); check_mem_allocation(inbuffer, outbuffer); atexit(cleanup); ///Initialize CUDA cuda_init(cuda_gpu_id); }
static void init(struct fmt_main *self) { ///Allocate memory for hashes and passwords inbuffer = (crypt_md5_password *) mem_calloc(MAX_KEYS_PER_CRYPT * sizeof(crypt_md5_password)); outbuffer = (crypt_md5_crack *) mem_alloc(MAX_KEYS_PER_CRYPT * sizeof(crypt_md5_crack)); check_mem_allocation(inbuffer, outbuffer); ///Initialize CUDA cuda_init(); }
static void init(struct fmt_main *self) { cuda_init(); if (cuda_getAsyncEngineCount() > 0) { overlap = 1; inbuffer = cuda_pageLockedMalloc(inbuffer, sizeof(sha256_password) * MAX_KEYS_PER_CRYPT); outbuffer = cuda_pageLockedMalloc(outbuffer, sizeof(SHA_HASH) * MAX_KEYS_PER_CRYPT); } else { overlap = 0; //device does not support overlapping memcpy and kernel execution inbuffer = (sha256_password *) mem_calloc(MAX_KEYS_PER_CRYPT, sizeof(sha256_password)); outbuffer = (SHA_HASH *) mem_alloc(MAX_KEYS_PER_CRYPT * sizeof(SHA_HASH)); } check_mem_allocation(inbuffer, outbuffer); }