deriveSecret implements Derive-Secret from RFC 8446, Section 7.1.
(secret []byte, label string, transcript hash.Hash)
| 52 | |
| 53 | // deriveSecret implements Derive-Secret from RFC 8446, Section 7.1. |
| 54 | func (c *cipherSuiteTLS13) deriveSecret(secret []byte, label string, transcript hash.Hash) []byte { |
| 55 | if transcript == nil { |
| 56 | transcript = c.hash.New() |
| 57 | } |
| 58 | return c.expandLabel(secret, label, transcript.Sum(nil), c.hash.Size()) |
| 59 | } |
| 60 | |
| 61 | // extract implements HKDF-Extract with the cipher suite hash. |
| 62 | func (c *cipherSuiteTLS13) extract(newSecret, currentSecret []byte) []byte { |
no test coverage detected