Election-Tech-Initiative / Election-Tech-Initiative/electionguard-core2

✨ Hash Elements Enforce polymorphism in c#

Open
#239 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
14
Forks
12
PR merge metrics
No merged PRs in 30d

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Suggestion

The c++ hash elements function allows a variant array of objects to be passed in to the hash functions. The C interface also hides types through its use of opaque structs. The c# interface has a function `HashElems(string prefix, params ICryptoHashableType[] data)`. This enhancement is to enforce polymorphism for the 1ICryptoHashableType` and `CryptoHashableBase` components so that we do not need to use switch statements or boolean comparisons to determine the type of the object when hashing.

### Possible Implementation

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.