Lines Matching full:salt
21 const unsigned char *salt;
53 const unsigned char *salt, size_t salt_len,
63 ret &= EVP_DigestUpdate(mdctx, salt, salt_len);
77 const unsigned char *salt, size_t salt_size,
83 hash_block(md, in + i, block_size, salt, salt_size, out, &s);
99 ctx->salt, ctx->salt_size, ctx->block_size);
114 " -a,--salt-str=<string> set salt to <string>\n"
115 " -A,--salt-hex=<hex digits> set salt to <hex digits>\n"
127 unsigned char *salt = NULL;
136 {"salt-str", required_argument, 0, 'a'},
137 {"salt-hex", required_argument, 0, 'A'},
152 salt = new unsigned char[salt_size]();
153 if (salt == NULL) {
154 FATAL("failed to allocate memory for salt\n");
156 memcpy(salt, optarg, salt_size);
161 FATAL("failed to convert salt from hex\n");
164 salt = new unsigned char[salt_size]();
165 if (salt == NULL) {
166 FATAL("failed to allocate memory for salt\n");
168 if((size_t)BN_bn2bin(bn, salt) != salt_size) {
169 FATAL("failed to convert salt to bytes\n");
215 if (!salt || !salt_size) {
217 salt = new unsigned char[salt_size];
218 if (salt == NULL) {
219 FATAL("failed to allocate memory for salt\n");
227 ssize_t ret = read(random_fd, salt, salt_size);
311 hash_block(md, zero_block, block_size, salt, salt_size, zero_block_hash, NULL);
318 ctx.salt = salt;
335 salt, salt_size, block_size);
348 printf("%02x", salt[i]);
362 delete[] salt;