encoding

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package encoding handles serialization and parsing of PHC strings.

Package encoding handles encoding and parsing of PHC strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodedHash

type EncodedHash struct {
	Algorithm string
	Version   int
	Params    map[string]string
	Salt      []byte
	Hash      []byte
}

EncodedHash captures a PHC-formatted hash and associated metadata.

func Parse

func Parse(s string) (*EncodedHash, error)

Parse decodes a PHC-formatted string into an EncodedHash structure.

func (EncodedHash) String

func (e EncodedHash) String() string

String renders the hash in PHC string format with deterministic parameter ordering.

Jump to

Keyboard shortcuts

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