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 ( MD5 = HashSpec{crypto.MD5} SHA1 = HashSpec{crypto.SHA1} SHA224 = HashSpec{crypto.SHA224} SHA256 = HashSpec{crypto.SHA256} SHA384 = HashSpec{crypto.SHA384} SHA512 = HashSpec{crypto.SHA512} RIPEMD160 = HashSpec{crypto.RIPEMD160} )
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
type CipherSpec ¶
type CipherSpec struct {
// contains filtered or unexported fields
}
CipherSpec represents a cipher algorithm.
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 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
Click to show internal directories.
Click to hide internal directories.