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).
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 callinggetWriter
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).