Documentation
¶
Overview ¶
Package sha1 implements a non-standard compliant SHA-1 hash algorithm, as used by Diablo 1.
Index ¶
- Constants
- Variables
- func Sum(data []byte) []byte
- type Context
- func (ctx *Context) BlockSize() int
- func (ctx *Context) Final(digest []byte)
- func (ctx *Context) Init()
- func (ctx *Context) Reset()
- func (ctx *Context) Size() int
- func (ctx *Context) Sum(b []byte) []byte
- func (ctx *Context) Transform()
- func (ctx *Context) Update(data []byte)
- func (ctx *Context) Write(data []byte) (n int, err error)
Constants ¶
View Source
const ( // The blocksize of SHA-1 in bytes. BlockSize = 64 // The size of a SHA-1 checksum in bytes. Size = 20 )
Variables ¶
View Source
var ( // ref: 0x69EFB0 Contexts = (*[3]Context)(unsafe.Pointer(uintptr(0x69EFB0))) )
Global variables.
Functions ¶
Types ¶
type Context ¶
Context holds the context of a SHA-1 running hashsum. Context implements the hash.Hash interface.
func (*Context) Final ¶
Final copies the message digest of the given SHA-1 context to dst.
ref: 0x456A2B
func (*Context) Init ¶
func (ctx *Context) Init()
Init initializes the given SHA-1 context.
ref: 0x456C82
func (*Context) Sum ¶
Sum appends the current hash to b and returns the resulting slice. It does not change the underlying hash state.
func (*Context) Transform ¶
func (ctx *Context) Transform()
Transform performs a SHA-1 transformation on the 64-byte block of the given SHA-1 context.
ref: 0x456AC4
Click to show internal directories.
Click to hide internal directories.