aesgcmPreferred returns whether the first known cipher in the preference list is an AES-GCM cipher, implying the peer has hardware support for it.
(ciphers []uint16)
| 387 | // aesgcmPreferred returns whether the first known cipher in the preference list |
| 388 | // is an AES-GCM cipher, implying the peer has hardware support for it. |
| 389 | func aesgcmPreferred(ciphers []uint16) bool { |
| 390 | for _, cID := range ciphers { |
| 391 | if c := cipherSuiteByID(cID); c != nil { |
| 392 | return aesgcmCiphers[cID] |
| 393 | } |
| 394 | if c := cipherSuiteTLS13ByID(cID); c != nil { |
| 395 | return aesgcmCiphers[cID] |
| 396 | } |
| 397 | } |
| 398 | return false |
| 399 | } |
| 400 | |
| 401 | func cipherRC4(key, iv []byte, isRead bool) any { |
| 402 | cipher, _ := rc4.NewCipher(key) |
no test coverage detected
searching dependent graphs…