Skip to content

Allow also async Hasher functions #147

@cre8

Description

@cre8
  • I'm submitting a ...
    [ ] bug report
    [X] feature request
    [X] question about the decisions made in the repository
    [ ] question about how to use this project

Right now the hasher function has to be async which is fine in environments like NodeJS where the native crypto API provides a sync call. Unfortunately this is not the case browser based environments where the webcrypto only offers async calls for non blocking execution. Therefor I would propose to change the hasher type from only Hasher to ´Hasher | AsyncHasher`. This requires updates to the PEX library and also to the ssi-types.

Are there any reasons to stay with an only sync call beside the requirement of refactoring?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions