crc

package
v0.3.23 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 8 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(algType types.Type, config *types.Config) (interfaces.Cryptographic, error)

NewCRC creates a new CRC crypto instance

func ResolveType

func ResolveType(p types.Type) (types.Type, 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) Type

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

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) String

func (p *Params) String() string

func (*Params) ToMap

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

Jump to

Keyboard shortcuts

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