security

package
v0.0.0-...-c37b867 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: GPL-2.0, GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptCipher

func DecryptCipher(prevHash, cipherStr string) (string, error)
For use in integration tests, also a reference for the frontend js

implementation

func RawToHash

func RawToHash(raw string) string

INPUT: passcode string, OUTPUT: hex hash bytes

func SetHashAndRetrieveCipher

func SetHashAndRetrieveCipher(dbo tp.ControllerTemplate,
	isGenesis bool, prevHash string) (string, error)
Sets the new randomly generated hash by inserting into the database. Returns

A string which is the new raw text symmetrically encrypted

func ValidateHash

func ValidateHash(dbo tp.ControllerTemplate, hash string) (bool, error)
Function to validate the provided hash against the **Chain Law**, determining

whether a lawful post can be made

func ValidateReactionHash

func ValidateReactionHash(
	dbo tp.ControllerTemplate, hash string, postId int) (bool, int, error)
Function to validate a reaction hash against the **Chain Law**, determining

what level of gravitas the reaction will have

Types

This section is empty.

Jump to

Keyboard shortcuts

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