boost::http::bcrypt::get_rounds

Extract the cost factor from a hash string.

Synopsis

unsigned int
get_rounds(
    core::string_view hash,
    system::error_code& ec);

Exception Safety

Strong guarantee.

Complexity

Constant.

Return Value

The cost factor (4‐31) on success, or 0 if an error occurred.

Parameters

Name Description

hash

The hash string to parse.

ec

Set to bcrypt::error::invalid_hash if the hash is malformed.

Created with MrDocs