### Navigation

- index
- modules |
- vSphere Automation SDK for Python 6.5.0 documentation »
- Module code »

# Source code for vmware.vapi.lib.fingerprint

    """
    Fingerprint related functions
    """

    __author__ = 'VMware, Inc.'
    __copyright__ = 'Copyright (c) 2015 VMware, Inc.  All rights reserved.'

    import hashlib
    import six

    def generate_fingerprint(data):
        """
        Generate fingerprint for the given data

        :rtype: :class:`str`
        :return: fingerprint of the given data
        """
        if six.PY3:
            if isinstance(data, six.string_types):
                data = data.encode('utf-8')
        return hashlib.md5(data).hexdigest()

### Navigation

- index
- modules |
- vSphere Automation SDK for Python 6.5.0 documentation »
- Module code »