Convenience functions for short digests, handy if generating storage keys or other identifiers.

Usage

import {
  shortSafeDigest,
  shortHexDigest
} from 'webdaemon'

Patterns

Generate a base64 digest from an email address:

const digest = shortSafeDigest('foo@bar.com') // e.g. 'Zm9vQGJhci5jb20K'

Generate 5 hex chars from an email address:

const shortid = shortHexDigest('foo@bar.com', 5) // e.g. 'a4055'