Documentation ¶
Index ¶
- func Canonize(req *http.Request, body io.Reader) ([]byte, error)
- func Decode(s string) ([]byte, error)
- func Decrypt(ciphertext []byte, key *EncryptionKey) ([]byte, error)
- func Encode(b []byte) string
- func Encrypt(plaintext []byte, key *EncryptionKey) ([]byte, error)
- func EncryptionKeyEncode(key *EncryptionKey) string
- func Sign(req *http.Request, body []byte, privKey *SigningKeyPrivate) error
- func SigningKeyPrivateEncode(key *SigningKeyPrivate) (string, error)
- func SigningKeyPublicEncode(key *SigningKeyPublic) (string, error)
- func Verify(req *http.Request, body []byte, pubKey *SigningKeyPublic) error
- type EncryptionKey
- type SigningKeyPrivate
- type SigningKeyPublic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncryptionKeyEncode ¶
func EncryptionKeyEncode(key *EncryptionKey) string
EncryptionKeyEncode ...
func SigningKeyPrivateEncode ¶
func SigningKeyPrivateEncode(key *SigningKeyPrivate) (string, error)
SigningKeyPrivateEncode ...
func SigningKeyPublicEncode ¶
func SigningKeyPublicEncode(key *SigningKeyPublic) (string, error)
SigningKeyPublicEncode ...
Types ¶
type EncryptionKey ¶
type EncryptionKey = [32]byte
EncryptionKey ...
func CombineKeys ¶
func CombineKeys(hkey *EncryptionKey, keys ...*EncryptionKey) (*EncryptionKey, error)
CombineKeys ...
func EncryptionKeyDecode ¶
func EncryptionKeyDecode(key string) (*EncryptionKey, error)
EncryptionKeyDecode ...
type SigningKeyPrivate ¶
type SigningKeyPrivate = ecdsa.PrivateKey
func NewSigningKeyPrivate ¶
func NewSigningKeyPrivate() (*SigningKeyPrivate, error)
NewSigningKeyPrivate ...
func SigningKeyPrivateDecode ¶
func SigningKeyPrivateDecode(key string) (*SigningKeyPrivate, error)
SigningKeyPrivateDecode ...
type SigningKeyPublic ¶
func SigningKeyPublicDecode ¶
func SigningKeyPublicDecode(key string) (*SigningKeyPublic, error)
SigningKeyPublicDecode ...
Click to show internal directories.
Click to hide internal directories.