Sphire Mantis' API Documentation
import "github.com/sphireinc/mantis/encryption"
Md5 are our enumerators Sha224 Sha256 Sha384 Sha512 Sha512224 Sha512256 Hmac512
const (
Md5 int8 = iota
Sha224
Sha256
Sha384
Sha512
Sha512224
Sha512256
Hmac512
)
func CreateRandomBytes(bytes int) []byte
CreateRandomBytes creates a random bytes of bytes int
func CreateRandomString(bytes int) string
CreateRandomString generates a random string of n bytes
MHash our input/output tracking struct
type MHash struct {
input string
isHashed bool
Output string
algorithm int8
}
func New(input string, algorithm int8) *MHash
New returns an instance of MHash given our input and algorithm
func (h *MHash) Algorithm() (int8, string)
Algorithm returns the chosen algorithm as a string and int
func (h *MHash) GetInput() string
GetInput returns the initial input
func (h *MHash) GetOutput() string
GetOutput returns the hashed output
func (h *MHash) Hash()
Hash performs our hash, fills in Output, and unsets input
func (h *MHash) IsHashed() bool
IsHashed tells us whether our MHash has been MHash()‘d
func (h *MHash) MarshalJSON() ([]byte, error)
MarshalJSON implements the JSON encoding interface
Generated by gomarkdoc