openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libxcrypt/4.4.6-r0/git/lib/crypt-scrypt.c
void crypt_scrypt_rn(const char* phrase, size_t phr_size, const char* setting,
                     size_t set_size, uint8_t* output, size_t o_size,
                     void* scratch, size_t s_size)
{
    if (o_size < set_size + 1 + 43 + 1 ||
        CRYPT_OUTPUT_SIZE < set_size + 1 + 43 + 1)
    {
        errno = ERANGE;
        return;
    }

    /* Setting is invalid.  */
    if (strncmp(setting, "$7$", 3) || !verify_salt(setting, set_size))
    {
        errno = EINVAL;
        return;
    }

    crypt_yescrypt_rn(phrase, phr_size, setting, set_size, output, o_size,
                      scratch, s_size);
    return;
}
/*
 * Wrapper for crypt_yescrypt_rn to compute the hash.
 */
Wrapper for crypt_yescrypt_rn to compute the hash.
Wrapper for crypt_yescrypt_rn to compute the hash .
void crypt_scrypt_rn(const char* phrase, size_t phr_size, const char* setting,
                     size_t set_size, uint8_t* output, size_t o_size,
                     void* scratch, size_t s_size)
{
    if (o_size < set_size + 1 + 43 + 1 ||
        CRYPT_OUTPUT_SIZE < set_size + 1 + 43 + 1)
    {
        errno = ERANGE;
        return;
    }
    if (strncmp(setting, "$7$", 3) || !verify_salt(setting, set_size))
    {
        errno = EINVAL;
        return;
    }
    crypt_yescrypt_rn(phrase, phr_size, setting, set_size, output, o_size,
                      scratch, s_size);
    return;
}
void crypt_scrypt_rn ( const char * phrase , size_t phr_size , const char * setting , size_t set_size , uint8_t * output , size_t o_size , void * scratch , size_t s_size ) { if ( o_size < set_size + 1 + 43 + 1 || CRYPT_OUTPUT_SIZE < set_size + 1 + 43 + 1 ) { errno = ERANGE ; return ; } if ( strncmp ( setting , " " , 3 ) || ! verify_salt ( setting , set_size ) ) { errno = EINVAL ; return ; } crypt_yescrypt_rn ( phrase , phr_size , setting , set_size , output , o_size , scratch , s_size ) ; return ; }
Wrapper for crypt_yescrypt_rn to compute the hash.
Wrapper for crypt_yescrypt_rn to compute the hash .
/* Setting is invalid.  */