alastria/alastriaID-truffle-contracts

To complex to getPublicKeyStatus()

Closed this issue · 3 comments

The second parameter is supposed to be the hash of the public key, but it is the encodedPacked hash of the string, witch is not standard outside solidity. The other methods are computing this hash internally and the parameter is the public key as string memory.

It's odd to have to manually convert the string to bytes, then the bytes to string, add the "0x" and then hash it.

Hi! I'll have a look. From my point of view this could be solved by changing the way public keys are managed. As you said, right now they're defined as string memory and should be defined as bytes32.

For the moment it has been decided to use a string as input argument.

It is still pending the study of using strings or bytes32 in all the public key registry.

A new implementation for the PublicKeyRegistry is under consideration