sodium-native

sodium-native

  • Get Started
  • API
  • Github

›API

Get Started

  • Introduction
  • Projects using sodium-native

API

  • Compatibility
  • API
  • Memory Protection
  • Generating Random Data
  • Helpers
  • Padding
  • Signing
  • Generic Hashing
  • Public/Secret Key Box Encryption
  • Sealed Box Encryption
  • Secret Key Box Encryption
  • AEAD (Authenticated Encryption with Additional Data)
  • Non-Authenticated Streaming Encryption
  • Authentication
  • Stream Encryption
  • One-Time Authentication
  • Password Hashing
  • Key Exchange
  • Diffie-Hellman
  • Finite Field Arithmetic
  • Short Hashes
  • Key Derivation
  • SHA
  • License

Short Hashes

Bindings for the crypto_shorthash API. See the libsodium crypto_shorthash docs for more information.

Constants

Buffer lengths (integer)

  • crypto_shorthash_BYTES
  • crypto_shorthash_KEYBYTES

String constants (string)

  • crypto_shorthash_PRIMITIVE

crypto_shorthash

sodium-native sodium-javascript

sodium.crypto_shorthash(out, in, k)

Hashes a value to a short hash based on a k.

  • out should be a buffer of length crypto_shorthash_BYTES
  • in should be a buffer of any size
  • k should be a buffer of length crypto_shorthash_KEYBYTES

The generated short hash is stored in out.

← Finite Field ArithmeticKey Derivation →
  • Constants
  • crypto_shorthash
Docs
Get StartedAPI
Community
LibsodiumHyperdivisionHyperdivision on Twitter
More
GitHubStar
Copyright © 2020 Hyperdivision