← Todos os pacotes

xs-hash

v1.0.0 por ? 0 downloads

Cryptographic and non-cryptographic hashing for XanaScript

xs install xs-hash
hashsha256md5checksumhmacsecurity

README

xs-hash

Hashing criptográfico e checksums para XanaScript.

API

  • sha256(texto) → hash SHA-256 (hex)
  • sha512(texto) → hash SHA-512 (hex)
  • sha1(texto) → hash SHA-1 (hex)
  • md5(texto) → hash MD5 (hex)
  • sha256-hmac(mensagem, chave) → HMAC-SHA256 (hex)
  • sha512-hmac(mensagem, chave) → HMAC-SHA512 (hex)
  • crc32(texto) → CRC32 (número sem sinal)
  • crc32-hex(texto) → CRC32 (hex, 8 dígitos)

Exemplo

xana
traz-ai "xs-hash" as hash
cria digest = hash.sha256("abc")
cria mac = hash.sha256-hmac("mensagem", "chave-secreta")
cria check = hash.crc32-hex("arquivo")
Avaliações

Nenhuma avaliação ainda.