Skip to content

Commit

Permalink
Rename method to be less missleading (#44)
Browse files Browse the repository at this point in the history
Motivation:

Currently the method name is quite missleading, let's fix this.

Modifications:

Rename setSenderPrivateKey(...) to setPrivateKey(...)

Result:

Less missleading method name
  • Loading branch information
normanmaurer committed Jan 14, 2024
1 parent f06342f commit 753b948
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -56,7 +56,7 @@ public Builder setConfiguration(OHttpCryptoConfiguration configuration) {
return this;
}

public Builder setSenderPrivateKey(AsymmetricCipherKeyPair privateKey) {
public Builder setPrivateKey(AsymmetricCipherKeyPair privateKey) {
this.privateKey = privateKey;
return this;
}
Expand Down
Expand Up @@ -286,7 +286,7 @@ public boolean decodePrefix(ByteBufAllocator alloc, ByteBuf in) {
receiver = OHttpCryptoReceiver.newBuilder()
.setOHttpCryptoProvider(provider)
.setConfiguration(version())
.setSenderPrivateKey(keys.getKeyPair(ciphersuite))
.setPrivateKey(keys.getKeyPair(ciphersuite))
.setCiphersuite(ciphersuite)
.setEncapsulatedKey(encapsulatedKey)
.build();
Expand Down
Expand Up @@ -168,7 +168,7 @@ public void testCryptoVectors(OHttpCryptoProvider senderProvider, OHttpCryptoPro
try (OHttpCryptoReceiver receiver = OHttpCryptoReceiver.newBuilder()
.setOHttpCryptoProvider(receiverProvider)
.setConfiguration(OHttpVersionDraft.INSTANCE)
.setSenderPrivateKey(serverKeys.getKeyPair(ciphersuite))
.setPrivateKey(serverKeys.getKeyPair(ciphersuite))
.setCiphersuite(receiverCiphersuite)
.setEncapsulatedKey(receiverEncapsulatedKey)
.setForcedResponseNonce(ByteBufUtil.decodeHexDump("c789e7151fcba46158ca84b04464910d"))
Expand Down

0 comments on commit 753b948

Please sign in to comment.