Lines Matching defs:salt
40 * 2. state := ExpandKey (state, salt, password)
43 * state := ExpandKey (state, 0, salt)
47 * 6. RETURN Concatenate (salt, ctext);
72 #define BCRYPT_MINLOGROUNDS 4 /* we have log2(rounds) in salt */
135 /* We handle $Vers$log2(NumRounds)$salt+passwd$
139 crypt_blowfish(const char *key, const char *salt)
156 if (*salt == '$') {
158 salt++;
160 if (*salt > BCRYPT_VERSION) {
166 if (salt[1] != '$') {
167 switch (salt[1]) {
170 minr = salt[1];
171 salt++;
180 salt += 2;
182 if (salt[2] != '$')
186 memcpy(arounds, salt, sizeof(arounds));
197 salt += 3;
200 if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT)
203 /* We dont want the base64 salt but the raw data */
204 decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *) salt);
301 char salt[100];
303 salt[0] = '$';
304 salt[1] = BCRYPT_VERSION;
305 salt[2] = '$';
307 snprintf(salt + 3, 4, "%2.2u$", 5);
309 printf("24 bytes of salt: ");
310 fgets(salt + 6, sizeof(salt) - 6, stdin);
311 salt[99] = 0;
317 p = crypt(blubber, salt);
321 printf("Generated salt: %s\n", p);