The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Name

Myriad::Util::Secret - protect secrets from getting exposed accidentally

SYNOPSIS

    my $secret = Myriad::Util::Secret->new('shh.. secret!');

DESCRIPTION

When stringified, this will return *** instead of the real data.

not_equal

Returns true if the secret value does not match the provided value.

equal

Returns true if the secret value matches the provided value.

secret_value

Returns the original secret value as text.

SEE ALSO

  • String::Compare::ConstantTime - handles the constant-time comparison, but returns early if the string lengths are different, which is problematic since knowing the length makes attacks easier

AUTHOR

Deriv Group Services Ltd. DERIV@cpan.org.

See "CONTRIBUTORS" in Myriad for full details.

LICENSE

Copyright Deriv Group Services Ltd 2020-2022. Licensed under the same terms as Perl itself.