Source File
change_cipher_spec.go
Belonging Package
github.com/pion/dtls/v2/pkg/protocol
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage protocol// ChangeCipherSpec protocol exists to signal transitions in// ciphering strategies. The protocol consists of a single message,// which is encrypted and compressed under the current (not the pending)// connection state. The message consists of a single byte of value 1.// https://tools.ietf.org/html/rfc5246#section-7.1type ChangeCipherSpec struct{}// ContentType returns the ContentType of this contentfunc ( ChangeCipherSpec) () ContentType {return ContentTypeChangeCipherSpec}// Marshal encodes the ChangeCipherSpec to binaryfunc ( *ChangeCipherSpec) () ([]byte, error) {return []byte{0x01}, nil}// Unmarshal populates the ChangeCipherSpec from binaryfunc ( *ChangeCipherSpec) ( []byte) error {if len() == 1 && [0] == 0x01 {return nil}return errInvalidCipherSpec}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |