Defold Crypt documentation

This extension provides functions for interacting with various hash and encode/decode algorithms. The extension wraps the dmCrypt API from the Defold SDK to Lua.


To use this library in your Defold project, add the following URL to your game.project dependencies:

We recommend using a link to a zip file of a specific release.


The API provides the following functions:

  • crypt.hash_sha1(source)
  • crypt.hash_sha256(source)
  • crypt.hash_sha512(source)
  • crypt.hash_md5(source)
  • crypt.encode_base64(source)
  • crypt.decode_base64(source)
  • crypt.encrypt_xtea(source, key)
  • crypt.decrypt_xtea(source, key)

Source code

The source code is available on GitHub

API reference

API Reference - crypt