hmacsha512

package
v0.0.0-...-64476e7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package hmacsha512 contains an inlined an optimized version of hmac+sha512. Unfortunately, this requires exposing some of the details from crypto/sha512.

Index

Constants

View Source
const BlockSize = 128

BlockSize is the block size of SHA-512 hash function.

View Source
const Size = 64

Size is the size of SHA-512 checksum in bytes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Partial

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

Partial is an in-progress HMAC calculation.

func New

func New(key []byte) Partial

New creates a new HMAC-SHA512 calculator. It only supports keys that are smaller than sha512.BlockSize.

func (*Partial) Init

func (hm *Partial) Init(key []byte)

Init initializes the state with the specified key.

func (*Partial) SumAndReset

func (hm *Partial) SumAndReset() [Size]byte

SumAndReset calculates the sum so far and resets the state.

func (*Partial) Write

func (hm *Partial) Write(p []byte)

Write appends message to the HMAC calculation.

Jump to

Keyboard shortcuts

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