Select Git revision
rsa
-
-
- Open in your IDE
- Download source code
- Download this directory

Richard T. Carback III
authored
There's a bug in this test where it's calculating a digestfor the nil preimage. This is caused by using `.Sum` with a byte slice, which one might think includes that slice in the hash, but in fact only appends to that slice. This is a regular mistake, and the situation becomes incredibly confusing when you look at the blake2b implemenation which has `.Sum` functions that work the way one might expect. Since it is becoming a checklist item, I think that qualifies `.Sum` as at least confusing and needing specific rules (imo it should be deprecated as well, its fine at first glance but seems sloppy in practice given how often devs mess it up). Moving forward, `.Sum(nil)` is the only acceptable usage and anything else should be changed unless there's a very defensible reason AND a comment explaining why it is the way it is.
Name | Last commit | Last update |
---|---|---|
.. | ||
pem.go | ||
pem_test.go | ||
rsa.go | ||
rsaBitLength.go | ||
rsa_test.go |