ciphersuite

package
v0.0.0-...-eb2fa4d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 4 Imported by: 0

README

ciphersuite

The info about ciphersuites mostly comes from ciphersuite.info.

Documentation

Index

Constants

View Source
const (
	SSL30 uint16 = 0x0300
	TLS10 uint16 = 0x0301
	TLS11 uint16 = 0x0302
	TLS12 uint16 = 0x0303
	TLS13 uint16 = 0x0304
)

Variables

View Source
var CipherSuites = []CipherSuite{}/* 346 elements not displayed */

Functions

func Marshal

func Marshal(ciphers []CipherSuite) []byte

Marshal marshals ciphers to a byte slice

Types

type CipherSuite

type CipherSuite struct {
	Value []byte
	Name  string

	Security string
	// contains filtered or unexported fields
}

func FindByUint16

func FindByUint16(ciphers []CipherSuite, cipher uint16) *CipherSuite

FindByUint16 returns a pointer to a CipherSuite from ciphers based on cipher. If not found, returns nil.

func Get

func Get(version uint16) []CipherSuite

Get returns the known ciphers for version, or nil if the version is invalid.

func Remove

func Remove(ciphers []CipherSuite, cipher CipherSuite) []CipherSuite

func Unmarhsal

func Unmarhsal(bytes []byte) (CipherSuite, error)

Unmarshal returns a known CipherSuite from CipherSuites based on bytes.

func (CipherSuite) Compare

func (a CipherSuite) Compare(b CipherSuite) int

Compare returns returns -1 if a < b, 0 if a == b or 1 if a > b.

func (CipherSuite) String

func (c CipherSuite) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL