Documentation ¶
Index ¶
- func DecryptCipher(prevHash, cipherStr string) (string, error)
- func RawToHash(raw string) string
- func SetHashAndRetrieveCipher(dbo tp.ControllerTemplate, isGenesis bool, prevHash string) (string, error)
- func ValidateHash(dbo tp.ControllerTemplate, hash string) (bool, error)
- func ValidateReactionHash(dbo tp.ControllerTemplate, hash string, postId int) (bool, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptCipher ¶
For use in integration tests, also a reference for the frontend js
implementation
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 ¶
Function to validate a reaction hash against the **Chain Law**, determining
what level of gravitas the reaction will have
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.