cipher

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TLSAecdhAes128Sha256

type TLSAecdhAes128Sha256 struct {
	// contains filtered or unexported fields
}

TLSAecdhAes128Sha256 implements the TLS_ADH_AES128_SHA256 CipherSuite

func NewTLSAecdhAes128Sha256

func NewTLSAecdhAes128Sha256(id dtls.CipherSuiteID) *TLSAecdhAes128Sha256

NewTLSAecdhAes128Sha256 create cipher. By RFC id must be `0xC018` but just works uses 0xff00

func (*TLSAecdhAes128Sha256) AuthenticationType

func (c *TLSAecdhAes128Sha256) AuthenticationType() dtls.CipherSuiteAuthenticationType

AuthenticationType controls what authentication method is using during the handshake

func (*TLSAecdhAes128Sha256) CertificateType

func (c *TLSAecdhAes128Sha256) CertificateType() clientcertificate.Type

CertificateType returns what type of certificate this CipherSuite exchanges

func (*TLSAecdhAes128Sha256) Decrypt

func (c *TLSAecdhAes128Sha256) Decrypt(raw []byte) ([]byte, error)

Decrypt decrypts a single TLS RecordLayer

func (*TLSAecdhAes128Sha256) ECC added in v1.2.0

func (c *TLSAecdhAes128Sha256) ECC() bool

func (*TLSAecdhAes128Sha256) Encrypt

func (c *TLSAecdhAes128Sha256) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)

Encrypt encrypts a single TLS RecordLayer

func (*TLSAecdhAes128Sha256) HashFunc

func (c *TLSAecdhAes128Sha256) HashFunc() func() hash.Hash

HashFunc returns the hashing func for this CipherSuite

func (*TLSAecdhAes128Sha256) ID

func (c *TLSAecdhAes128Sha256) ID() dtls.CipherSuiteID

ID returns the ID of the CipherSuite

func (*TLSAecdhAes128Sha256) Init

func (c *TLSAecdhAes128Sha256) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error

Init initializes the internal Cipher with keying material

func (*TLSAecdhAes128Sha256) IsInitialized

func (c *TLSAecdhAes128Sha256) IsInitialized() bool

IsInitialized returns if the CipherSuite has keying material and can encrypt/decrypt packets

func (*TLSAecdhAes128Sha256) KeyExchangeAlgorithm added in v1.2.0

func (c *TLSAecdhAes128Sha256) KeyExchangeAlgorithm() dtls.CipherSuiteKeyExchangeAlgorithm

func (*TLSAecdhAes128Sha256) String

func (c *TLSAecdhAes128Sha256) String() string

Jump to

Keyboard shortcuts

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