su3

package
v0.0.0-...-e7d4585 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2017 License: MIT Imports: 15 Imported by: 6

Documentation

Index

Constants

View Source
const (
	SigTypeDSA             = uint16(0)
	SigTypeECDSAWithSHA256 = uint16(1)
	SigTypeECDSAWithSHA384 = uint16(2)
	SigTypeECDSAWithSHA512 = uint16(3)
	SigTypeRSAWithSHA256   = uint16(4)
	SigTypeRSAWithSHA384   = uint16(5)
	SigTypeRSAWithSHA512   = uint16(6)

	ContentTypeUnknown = uint8(0)
	ContentTypeRouter  = uint8(1)
	ContentTypePlugin  = uint8(2)
	ContentTypeReseed  = uint8(3)
	ContentTypeNews    = uint8(4)

	FileTypeZIP   = uint8(0)
	FileTypeXML   = uint8(1)
	FileTypeHTML  = uint8(2)
	FileTypeXMLGZ = uint8(3)
)

Variables

This section is empty.

Functions

func NewSigningCertificate

func NewSigningCertificate(signerID string, privateKey *rsa.PrivateKey) ([]byte, error)

Types

type File

type File struct {
	Format        uint8
	SignatureType uint16
	FileType      uint8
	ContentType   uint8

	Version     []byte
	SignerID    []byte
	Content     []byte
	Signature   []byte
	SignedBytes []byte
}

func New

func New() *File

func (*File) BodyBytes

func (s *File) BodyBytes() []byte

func (*File) MarshalBinary

func (s *File) MarshalBinary() ([]byte, error)

func (*File) Sign

func (s *File) Sign(privkey *rsa.PrivateKey) error

func (*File) String

func (s *File) String() string

func (*File) UnmarshalBinary

func (s *File) UnmarshalBinary(data []byte) error

func (*File) VerifySignature

func (s *File) VerifySignature(cert *x509.Certificate) error

Jump to

Keyboard shortcuts

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