interledger-deprecated / java-ilp-core

WE'VE MOVED: This project has moved to Hyperledger Quilt
https://github.com/hyperledger/quilt/tree/master/ilp-core
Apache License 2.0
16 stars 10 forks source link

PSK: Consider renaming PskWriterFactory methods? #31

Closed sappenin closed 7 years ago

sappenin commented 7 years ago

Minor nit, but what does everyone think about renaming PskReaderFactory/PskWriterFactory methods to the following, for clarity:

public static PskMessageWriter getUnencryptedWriter()

public static PskMessageWriter getEncryptedWriter(byte[] secretKey)

Currently, both methods are called getWriter, but it wasn't immediately obvious that calling getWriter without a secret key would return an unencrypted writer (though after thinking about it, the contract does make sense - what else would it return....but it was a bit confusing at first until I looked into the methods to see what they were doing).

earizon commented 7 years ago

@sappenin +1 The more intuitive for library users, the best for all.

andrew-g-za commented 7 years ago

+1