Update digest sample code in the docs

Open
#65 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Search the documentation for the sample using Mechanism.SHA_256 and compare it with the reported AttributeError. Update the sample to use Mechanism.SHA256, then verify the documented code matches the supported mechanism name.

Written by the indexing model from the issue text.

Description

In the docs:
digest = session.digest(data, mechanism=Mechanism.SHA_256)

This would lead to the error:
AttributeError(name) from None

It should be:
digest = session.digest(data, mechanism=Mechanism.SHA256)

Dominant language
Python
Stars
170
Forks
79
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pyauth/python-pkcs11

All issues in pyauth/python-pkcs11

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.