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

NAME

SMB::Crypt - Fallback implementations of cryptography algorithms for SMB

SYNOPSIS

        use SMB::Crypt qw(md4);

        my $digest = md4($data);

ABSTRACT

This module provides fallback implementations for DES and MD4 in pure perl to reduce dependence on non-standard perl modules.

However it is recommended to install Crypt::DES and Digest::MD4 modules to get improved performance.

You should also install Digest::HMAC_MD5 that currently has no fallback implementation.

EXPORTED FUNCTIONS

By default, functions des_crypt56, md4 and hmac_md5 are exported using the standard Exporter mechanism.

des_crypt56 EIGHT_BYTE_INPUT SEVEN_BYTE_KEY_STR [FORWARD=1]

Returns output of eight bytes that is a permutation of the input according to a key.

If Crypt::DES is found, it is used, otherwise pure perl fallback implemenation is used.

md4 DATA

Returns digest of 16 bytes, similar to Digest::MD4::md4.

If Digest::MD4 is found, it is used, otherwise pure perl fallback implemenation is used.

hmac_md5 DATA KEY

Returns digest of 16 bytes, the same as Digest::HMAC_MD5::hmac_md5.

AUTHOR

Mikhael Goikhman <migo@cpan.org>

ACKNOWLEGDEMENTS

Ported from samba project.