<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Data::Random::HashType - Random hash type objects.

SYNOPSIS
     use Data::Random::HashType;

     my $obj = Data::Random::HashType-&gt;new(%params);
     my @hash_types = $obj-&gt;random;

METHODS
  "new"
     my $obj = Data::Random::HashType-&gt;new(%params);

    Constructor.

    *       "cb_id"

            Callback to adding of id.

            Default value is subroutine which returns "$self-"{'id'}++&gt;.

    *       "dt_start"

            DateTime object with start date for random valid_from date.
            Range is dt_start and actual date.

            Default value is January 1. year ago.

    *       "id"

            Minimal id for adding. Only if "mode_id" is set to 1.

            Default value is 1.

    *       "mode_id"

            Boolean value if we are generating id in hash type object.

            Default value is 0.

    *       "num_generated"

            Number of generated hash types.

            Default value is 1.

    *       "possible_hash_types"

            Possible hash type names for result.

            Default value is list (SHA-256 SHA-384 SHA-512).

    Returns instance of object.

  "random"
     my @hash_types = $obj-&gt;random;

    Get random hash type object.

    Returns instance of Data::HashType.

ERRORS
     new():
             From Mo::utils:
                     Parameter 'dt_start' is required.
                     Parameter 'dt_start' must be a 'DateTime' object.
                             Value: %s
                             Reference: %s
                     Parameter 'mode_id' must be a bool (0/1).
                             Value: %s
                     Parameter 'num_generated' must be greater than %s.
                             Value: %s
             Parameter 'num_generated' is required.
             Parameter 'possible_hash_types' must be a reference to array.
             Parameter 'possible_hash_types' must contain at least one hash type name.

EXAMPLE
     use strict;
     use warnings;

     use Data::Printer;
     use Data::Random::HashType;

     my $obj = Data::Random::HashType-&gt;new(
             'mode_id' =&gt; 1,
             'num_generated' =&gt; 2,
     );

     my @hash_types = $obj-&gt;random;

     # Dump hash types to out.
     p @hash_types;

     # Output like:
     # [
     #     [0] Data::HashType  {
     #             parents: Mo::Object
     #             public methods (6):
     #                 BUILD
     #                 Error::Pure:
     #                     err
     #                 Mo::utils:
     #                     check_isa, check_length, check_number, check_required
     #             private methods (0)
     #             internals: {
     #                 id           1,
     #                 name         "SHA-384",
     #                 valid_from   2023-03-17T00:00:00 (DateTime)
     #             }
     #         },
     #     [1] Data::HashType  {
     #             parents: Mo::Object
     #             public methods (6):
     #                 BUILD
     #                 Error::Pure:
     #                     err
     #                 Mo::utils:
     #                     check_isa, check_length, check_number, check_required
     #             private methods (0)
     #             internals: {
     #                 id           2,
     #                 name         "SHA-256",
     #                 valid_from   2023-01-27T00:00:00 (DateTime)
     #             }
     #         }
     # ]

DEPENDENCIES
    Class::Utils, Data::HashType, DateTime, Error::Pure, Mo::utils,
    Random::Day, Readonly.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Data-Random-HashType&gt;

AUTHOR
    Michal Josef Ĺ&nbsp;paÄŤek &lt;mailto:skim@cpan.org&gt;

    &lt;http://skim.cz&gt;

LICENSE AND COPYRIGHT
    Â© 2023-2024 Michal Josef Ĺ&nbsp;paÄŤek

    BSD 2-Clause License

VERSION
    0.05

</pre></body></html>