platform/api/laravel/Hashing/BcryptHasher.yaml

149 lines
2.9 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: BcryptHasher
class_comment: null
dependencies:
- name: HasherContract
type: class
source: Illuminate\Contracts\Hashing\Hasher
- name: RuntimeException
type: class
source: RuntimeException
properties:
- name: rounds
visibility: protected
comment: '# * The default cost factor.
# *
# * @var int'
- name: verifyAlgorithm
visibility: protected
comment: '# * Indicates whether to perform an algorithm check.
# *
# * @var bool'
methods:
- name: __construct
visibility: public
parameters:
- name: options
default: '[]'
comment: "# * The default cost factor.\n# *\n# * @var int\n# */\n# protected $rounds\
\ = 12;\n# \n# /**\n# * Indicates whether to perform an algorithm check.\n# *\n\
# * @var bool\n# */\n# protected $verifyAlgorithm = false;\n# \n# /**\n# * Create\
\ a new hasher instance.\n# *\n# * @param array $options\n# * @return void"
- name: make
visibility: public
parameters:
- name: value
- name: options
default: '[]'
comment: '# * Hash the given value.
# *
# * @param string $value
# * @param array $options
# * @return string
# *
# * @throws \RuntimeException'
- name: check
visibility: public
parameters:
- name: value
- name: hashedValue
- name: options
default: '[]'
comment: '# * Check the given plain value against a hash.
# *
# * @param string $value
# * @param string $hashedValue
# * @param array $options
# * @return bool
# *
# * @throws \RuntimeException'
- name: needsRehash
visibility: public
parameters:
- name: hashedValue
- name: options
default: '[]'
comment: '# * Check if the given hash has been hashed using the given options.
# *
# * @param string $hashedValue
# * @param array $options
# * @return bool'
- name: verifyConfiguration
visibility: public
parameters:
- name: value
comment: '# * Verifies that the configuration is less than or equal to what is configured.
# *
# * @internal'
- name: isUsingCorrectAlgorithm
visibility: protected
parameters:
- name: hashedValue
comment: '# * Verify the hashed value''s algorithm.
# *
# * @param string $hashedValue
# * @return bool'
- name: isUsingValidOptions
visibility: protected
parameters:
- name: hashedValue
comment: '# * Verify the hashed value''s options.
# *
# * @param string $hashedValue
# * @return bool'
- name: setRounds
visibility: public
parameters:
- name: rounds
comment: '# * Set the default password work factor.
# *
# * @param int $rounds
# * @return $this'
- name: cost
visibility: protected
parameters:
- name: options
default: '[]'
comment: '# * Extract the cost value from the options array.
# *
# * @param array $options
# * @return int'
traits:
- RuntimeException
interfaces:
- HasherContract