microsoft / go-crypto-winnative

Go crypto backend for Windows using CNG
MIT License
28 stars 3 forks source link

Panic on short RC4Cipher.XORKeyStream output #60

Closed qmuntal closed 3 weeks ago

qmuntal commented 3 weeks ago

This PR fixes a small behavior difference with upstream RC4: RC4Cipher.XORKeyStream panics if the output buffer is smaller than the input buffer, while CNG doesn't complain and just does nothing. Also added an extensive test suite so we are fully compatible with upstream RC4.

qmuntal commented 3 weeks ago

Depends on #61.