Legacy CDDC JavaScript

Legacy CDDC JavaScript is supported old version of script, with dependency on JQuery library. This script is intended to be used in older existing solutions or in solutions using JQuery library already.

Script is exposing three functions to use.


/**
* @param {boolean} includeViewport
* @param {callback} callback
* @returns {string} raw finger print
*/
$.Vasco.getJSON(includeViewport, callback)
        

/**
 * @param {boolean} includeViewport
 * @param {callback} callback
 * @returns {string} hashed finger print
 */
$.Vasco.getHASH(includeViewport, callback) 
        

/**
 * @param {string} customText
 * @param {callback} callback
 * @returns {string} hashed finger print with custom text included
 */
$.Vasco.getCustomHASH(customText, callback)
        

Example of using script in a web page


<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script src="https://code.jquery.com/jquery-3.5.1.min.js"
        integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
        crossorigin="anonymous">
    </script>
    <script src="./lib/Vasco.IdKey.RM.CDDC.min.js"></script>

    <script type="text/javascript">
        var fingerprint = $.Vasco.getJSON();
        var hashedFingerprint = $.Vasco.getHASH();

        console.log('fingerprint is ' + fingerprint);
        console.log('hashed fingerprint is ' + hashedFingerprint);
    </script>
</body>
</html>
        
Try call getJSON!
Try call getHASH!
Try call getCustomHASH!