cipher

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

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