crc

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package crc implements the functions, types, and interfaces for the module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *types.Config

DefaultConfig returns the default configuration for CRC

func NewCRC

func NewCRC(algSpec types.Spec, config *types.Config) (scheme.Scheme, error)

NewCRC creates a new CRC crypto instance

func ResolveSpec added in v1.1.0

func ResolveSpec(p types.Spec) (types.Spec, error)

Types

type CRC

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

CRC implements CRC32 and CRC64 hashing algorithms

func (*CRC) Hash

func (c *CRC) Hash(password string) (*types.HashParts, error)

Hash implements the hash method

func (*CRC) HashWithSalt

func (c *CRC) HashWithSalt(password string, salt []byte) (*types.HashParts, error)

HashWithSalt implements the hash with salt method

func (*CRC) Spec added in v1.1.0

func (c *CRC) Spec() types.Spec

func (*CRC) Verify

func (c *CRC) Verify(parts *types.HashParts, password string) error

Verify implements the verify method

type Params

type Params struct {
}

Params holds the parameters for CRC algorithms

func (*Params) FromMap

func (p *Params) FromMap(params map[string]string) error

func (*Params) IsNil added in v1.1.0

func (p *Params) IsNil() bool

func (*Params) String

func (p *Params) String() string

func (*Params) ToMap

func (p *Params) ToMap() map[string]string

func (*Params) Validate added in v1.1.0

func (p *Params) Validate(config *types.Config) error

Jump to

Keyboard shortcuts

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