api/laravel/Hashing/ArgonHasher.yaml

217 lines
4.2 KiB
YAML
Raw Normal View History

2024-09-26 09:03:21 +00:00
name: ArgonHasher
class_comment: null
dependencies:
- name: HasherContract
type: class
source: Illuminate\Contracts\Hashing\Hasher
- name: RuntimeException
type: class
source: RuntimeException
properties:
- name: memory
visibility: protected
comment: '# * The default memory cost factor.
# *
# * @var int'
- name: time
visibility: protected
comment: '# * The default time cost factor.
# *
# * @var int'
- name: threads
visibility: protected
comment: '# * The default threads 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 memory cost factor.\n# *\n# * @var int\n# */\n# protected\
\ $memory = 1024;\n# \n# /**\n# * The default time cost factor.\n# *\n# * @var\
\ int\n# */\n# protected $time = 2;\n# \n# /**\n# * The default threads factor.\n\
# *\n# * @var int\n# */\n# protected $threads = 2;\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: algorithm
visibility: protected
parameters: []
comment: '# * Get the algorithm that should be used for hashing.
# *
# * @return int'
- 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: setMemory
visibility: public
parameters:
- name: memory
comment: '# * Set the default password memory factor.
# *
# * @param int $memory
# * @return $this'
- name: setTime
visibility: public
parameters:
- name: time
comment: '# * Set the default password timing factor.
# *
# * @param int $time
# * @return $this'
- name: setThreads
visibility: public
parameters:
- name: threads
comment: '# * Set the default password threads factor.
# *
# * @param int $threads
# * @return $this'
- name: memory
visibility: protected
parameters:
- name: options
comment: '# * Extract the memory cost value from the options array.
# *
# * @param array $options
# * @return int'
- name: time
visibility: protected
parameters:
- name: options
comment: '# * Extract the time cost value from the options array.
# *
# * @param array $options
# * @return int'
- name: threads
visibility: protected
parameters:
- name: options
comment: '# * Extract the thread''s value from the options array.
# *
# * @param array $options
# * @return int'
traits:
- RuntimeException
interfaces:
- HasherContract