format

package
Version: v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package format is meant to be utils for PHC Crypto package. The point is to be able to serialize and deserialize strings or interface in and out of PHC string format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serialize

func Serialize(config PHCConfig) string

Serialize converts PHCConfig struct into a PHC string. See https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md

Types

type PHCConfig

type PHCConfig struct {
	ID      string
	Version int
	Params  map[string]interface{}
	Salt    string
	Hash    string
}

PHCConfig is a struct required for creating a PHC string

func Deserialize

func Deserialize(hash string) PHCConfig

Deserialize converts a PHC string into a PHCConfig struct

Source Files

Jump to

Keyboard shortcuts

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