Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
crypto, hash: add WriteString support #14757
My thought on this issue: If you want high performance hashing, then using strings is very probable already a mistake (the string must come from somewhere else, so it gets converted from byte in the first place.) But if the string does not come from outside (I/O), then it's still better to use byte directly. Could you please given a real scenarios where you want WriteString support on a crypto.Hash while still care about the utmost performance? While I agree that WriteString support on io.MultiWriter is fine, adding WriteString support to all io.Writer implementations doesn't look necessary esp. if doesn't bring enough performance improvement.