gocrypto

package
v0.0.0-...-de3a50d Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2014 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package gocrypto implements okapi interfaces using Go's crypto library.

Index

Constants

This section is empty.

Variables

View Source
var (
	RC4      = CipherSpec{/* contains filtered or unexported fields */}
	AES_CBC  = CipherSpec{/* contains filtered or unexported fields */}
	AES_OFB  = CipherSpec{/* contains filtered or unexported fields */}
	AES_CTR  = CipherSpec{/* contains filtered or unexported fields */}
	DES3_CBC = CipherSpec{/* contains filtered or unexported fields */}
	DES3_OFB = CipherSpec{/* contains filtered or unexported fields */}
)
View Source
var (
	DefaultRandom = RandomSpec{}
)
View Source
var (
	HMAC = MACSpec{}
)

Functions

This section is empty.

Types

type BlockCipher

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

func (*BlockCipher) BlockSize

func (c *BlockCipher) BlockSize() int

func (*BlockCipher) BufferedSize

func (c *BlockCipher) BufferedSize() int

func (*BlockCipher) Close

func (c *BlockCipher) Close()

func (*BlockCipher) Finish

func (c *BlockCipher) Finish(out []byte) int

func (*BlockCipher) KeySize

func (c *BlockCipher) KeySize() int

func (*BlockCipher) Update

func (c *BlockCipher) Update(in, out []byte) (int, int)

type CipherSpec

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

CipherSpec represents a cipher algorithm.

func (CipherSpec) New

func (cs CipherSpec) New(key, iv []byte, encrypt bool) okapi.Cipher

func (CipherSpec) NewReader

func (cs CipherSpec) NewReader(in io.Reader, key, iv, buffer []byte) *okapi.CipherReader

func (CipherSpec) NewWriter

func (cs CipherSpec) NewWriter(out io.Writer, key, iv, buffer []byte) *okapi.CipherWriter

type Hash

type Hash struct {
	hash.Hash
	// contains filtered or unexported fields
}

func (*Hash) Clone

func (h *Hash) Clone() okapi.Hash

func (*Hash) Close

func (h *Hash) Close()

func (*Hash) Digest

func (h *Hash) Digest() []byte

func (*Hash) Reset

func (h *Hash) Reset()

func (*Hash) Write

func (h *Hash) Write(data []byte) (int, error)

type HashSpec

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

func (HashSpec) New

func (hs HashSpec) New() okapi.Hash

type MACSpec

type MACSpec struct{}

func (MACSpec) New

func (ms MACSpec) New(hs okapi.HashSpec, key []byte) okapi.Hash

type Random

type Random struct {
}

func (*Random) Close

func (r *Random) Close()

func (*Random) Read

func (r *Random) Read(b []byte) (int, error)

type RandomSpec

type RandomSpec struct{}

func (RandomSpec) New

func (rs RandomSpec) New() okapi.Random

type StreamCipher

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

func (*StreamCipher) BlockSize

func (c *StreamCipher) BlockSize() int

func (*StreamCipher) BufferedSize

func (c *StreamCipher) BufferedSize() int

func (*StreamCipher) Close

func (c *StreamCipher) Close()

func (*StreamCipher) Finish

func (c *StreamCipher) Finish(out []byte) int

func (*StreamCipher) KeySize

func (c *StreamCipher) KeySize() int

func (*StreamCipher) Update

func (c *StreamCipher) Update(in, out []byte) (int, int)

Jump to

Keyboard shortcuts

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