Skip to content

onsitejs/dali.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dali.js

dali.js is a Picasso-like device attestation payload.

Live demo availble here.

Use in-browser

Use the minified version in dist:

[7.8K]  dali.min.js 4a3708c0660ce8a01f8a9f85f1edcd13840ea2c77d183cdd349ab5bd42f24744

You can call it like so, with all the parameters in the exact order:

<script>
    dali([
        15, // repetitions
        8547498279832982569844, // seed
        500, // size
        2001000001, // offset
        15000, // multiplier
        20, // fontsize
        50 // maxblur
    ]).then(response => {
        const imgEle = document.createElement("img");
        imgEle.src = response.url;
        document.getElementById("dali-hash").innerHTML = response.hash;
        document.getElementById("dali-canvas").appendChild(imgEle);
    });
</script>

When called, the dali function will generate a Promise Response of:

{
    "url":"<url_string>",
    "hash":"<sha256_hash_string>"
}

Copyright

dali.js Includes the elements from the following open source projects:

References