Altcha (Altcha v2.0.1)

Copy Markdown View Source

Top-level Altcha module providing backward-compatible access to V1 functions.

Versioned namespaces

  • Altcha.V1 — original hash-based proof-of-work (SHA-1/256/512)
  • Altcha.V2 — key-derivation-based proof-of-work (PBKDF2, iterative SHA)

All functions in this module delegate to Altcha.V1. New code should use Altcha.V1 or Altcha.V2 explicitly.

Summary

Functions

algorithm_from_binary(algorithm)

See Altcha.V1.algorithm_from_binary/1.

algorithm_to_binary(algorithm)

See Altcha.V1.algorithm_to_binary/1.

create_challenge(options)

See Altcha.V1.create_challenge/1.

extract_params(payload)

See Altcha.V1.extract_params/1.

hash(data, algorithm)

See Altcha.V1.hash/2.

hash_hex(data, algorithm)

See Altcha.V1.hash_hex/2.

hmac_hash(data, algorithm, key)

See Altcha.V1.hmac_hash/3.

hmac_hex(data, algorithm, key)

See Altcha.V1.hmac_hex/3.

random_bytes(length)

See Altcha.V1.random_bytes/1.

random_int(max)

See Altcha.V1.random_int/1.

solve_challenge(challenge, salt)

See Altcha.V1.solve_challenge/2.

solve_challenge(challenge, salt, algorithm)

See Altcha.V1.solve_challenge/3.

solve_challenge(challenge, salt, algorithm, max)

See Altcha.V1.solve_challenge/4.

solve_challenge(challenge, salt, algorithm, max, start)

See Altcha.V1.solve_challenge/5.

verify_fields_hash(form_data, fields, fields_hash, algorithm)

See Altcha.V1.verify_fields_hash/4.

verify_server_signature(payload, hmac_key)

See Altcha.V1.verify_server_signature/2.

verify_solution(payload, hmac_key)

See Altcha.V1.verify_solution/2.

verify_solution(payload, hmac_key, check_expires)

See Altcha.V1.verify_solution/3.