microsoft / go-crypto-winnative

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

Add support for RC4 #46

Closed qmuntal closed 1 year ago

qmuntal commented 1 year ago

This PR implements the necessary functions to support crypto/rc4.

New benchmark results:

goos: windows
goarch: amd64
pkg: github.com/microsoft/go-crypto-winnative/cng
cpu: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
BenchmarkRC4_128-12      4958706               251.9 ns/op       508.17 MB/s           0 B/op          0 allocs/op
BenchmarkRC4_1K-12       1000000              1230 ns/op         832.66 MB/s           0 B/op          0 allocs/op
BenchmarkRC4_8K-12        123104              9057 ns/op         893.87 MB/s           0 B/op          0 allocs/op