Documentation ¶
Index ¶
- Constants
- Variables
- func Decrypt(wrapped, public, private string) (string, error)
- func Encrypt(message, public, private string) (string, error)
- func FirstDifference(a, b Hash) int
- func GenerateEd25519KeypairFromSecret(secret, salt string) (public string, private string)
- func GenerateRandomBoxKeypair() (public string, private string)
- func GenerateRandomEd25519Keypair() (public string, private string)
- func GenerateRandomToken(n int) string
- func IsSmaller(a, b Hash) bool
- func Sign(privateKey string, signable Signable) (string, error)
- func Verify(publicKey string, signable Signable, signature string) error
- type Hash
- type Hasher
- type Signable
- type Signer
Constants ¶
View Source
const HashBits = 8 * HashLen
View Source
const HashLen = 64
Variables ¶
View Source
var EmptyHash = Hash{}
Functions ¶
func FirstDifference ¶
func GenerateRandomToken ¶
Types ¶
type Hash ¶
var LastHash Hash
func CombineHashes ¶
func HashFromBytes ¶
func HashFromString ¶
func HashString ¶
func (Hash) MarshalJSON ¶
func (*Hash) UnmarshalJSON ¶
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
func (*Hasher) WriteString ¶
func (*Hasher) WriteUint64 ¶
Click to show internal directories.
Click to hide internal directories.