derecalliance / api-java

DeRec API for use in applications.
Apache License 2.0
5 stars 0 forks source link

DeRecIdentity: Usage of `publicKey` is unclear #29

Closed diptimahamuni closed 1 month ago

diptimahamuni commented 1 month ago

Problem

There is just one variable called publicKey in DeRecIdentity. It is not clear whether that refers to the encryption key or the signature key.

Solution

We should remove the variable publicKey, and instead clarify the variable names to remove this ambiguity.

private final String publicEncryptionKey;
private String publicSignatureKey;
private final byte[] publicEncryptionKeyDigest;
private byte[] publicSignatureKeyDigest;

The constructor of DeRecIdentity should be changed accordingly to accommodate for the addition of publicEncryptionKey and publicSignatureKey variables. Getters and setters should be added accordingly as well.