Documentation
¶
Index ¶
- Constants
- Variables
- func CheckHash(signingKey string, salt string, shouldBe string, hash []byte) (bool, error)
- func Equal(sealedHash1, sealedHash2 []byte) bool
- func EqualSigningKey(a, b SigningPrivateKey) bool
- func FormatPublicKey(pub SigningPublicKey) string
- func FormatSigningSeed(priv SigningPrivateKey) (string, error)
- func GenerateKey(keyLength int) (string, error)
- func GenerateSigningKey() (SigningPublicKey, SigningPrivateKey, error)
- func NewHash(args GenerateHashArgs, hashfn func() hash.Hash) ([]byte, error)
- func ParseSigningSeed(s string) (SigningPublicKey, SigningPrivateKey, error)
- func Sign(priv SigningPrivateKey, message []byte) ([]byte, error)
- func Verify(pub SigningPublicKey, message, sig []byte) bool
- type CipherTextError
- type Decryptor
- type EncryptionKeyError
- type Encryptor
- type GenerateHashArgs
- type HashError
- type IntegrityKeyError
- type InvalidUsageError
- type KeyGenerationError
- type MessageError
- type SigningKeyError
- type SigningPrivateKey
- type SigningPublicKey
Constants ¶
View Source
const ( SigningSeedSize = ed25519.SeedSize SigningPublicKeySize = ed25519.PublicKeySize SigningPrivateKeySize = ed25519.PrivateKeySize SignatureSize = ed25519.SignatureSize )
View Source
const ( ErrBadPublicKey = SigningKeyError("not an ed25519 public key") ErrBadPrivateKey = SigningKeyError("not an ed25519 private key") ErrBadSeed = SigningKeyError("not an ed25519 seed") ErrKeyGeneration = SigningKeyError("error generating signing key") )
Variables ¶
View Source
var SigningKeyEncoding = base64.StdEncoding
Functions ¶
func EqualSigningKey ¶
func EqualSigningKey(a, b SigningPrivateKey) bool
func FormatPublicKey ¶
func FormatPublicKey(pub SigningPublicKey) string
func FormatSigningSeed ¶
func FormatSigningSeed(priv SigningPrivateKey) (string, error)
func GenerateKey ¶
func GenerateSigningKey ¶
func GenerateSigningKey() (SigningPublicKey, SigningPrivateKey, error)
func ParseSigningSeed ¶
func ParseSigningSeed(s string) (SigningPublicKey, SigningPrivateKey, error)
func Verify ¶
func Verify(pub SigningPublicKey, message, sig []byte) bool
Types ¶
type CipherTextError ¶
type CipherTextError string
func (CipherTextError) Error ¶
func (e CipherTextError) Error() string
type EncryptionKeyError ¶
type EncryptionKeyError string
func (EncryptionKeyError) Error ¶
func (e EncryptionKeyError) Error() string
type Encryptor ¶
func NewCBCHMACEncryptor ¶
type GenerateHashArgs ¶
type IntegrityKeyError ¶
type IntegrityKeyError string
func (IntegrityKeyError) Error ¶
func (e IntegrityKeyError) Error() string
type InvalidUsageError ¶
type InvalidUsageError string
func (InvalidUsageError) Error ¶
func (e InvalidUsageError) Error() string
type KeyGenerationError ¶
type KeyGenerationError string
func (KeyGenerationError) Error ¶
func (e KeyGenerationError) Error() string
type MessageError ¶
type MessageError string
func (MessageError) Error ¶
func (e MessageError) Error() string
type SigningKeyError ¶
type SigningKeyError string
func (SigningKeyError) Error ¶
func (e SigningKeyError) Error() string
type SigningPrivateKey ¶
type SigningPrivateKey = ed25519.PrivateKey
type SigningPublicKey ¶
func ParsePublicKey ¶
func ParsePublicKey(s string) (SigningPublicKey, error)
Click to show internal directories.
Click to hide internal directories.