Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SealServiceClass = reflect.TypeOf((*SealService)(nil)).Elem()
Functions ¶
This section is empty.
Types ¶
type AsymmetricSealer ¶
type AsymmetricSealer interface {
PublicKey() crypto.PublicKey
PrivateKey() crypto.PrivateKey
EncodePublicKey() (string, error)
EncodePrivateKey() (string, error)
Seal(plaintext []byte, recipient crypto.PublicKey) (ciphertext []byte, err error)
Open(ciphertext []byte, sender crypto.PublicKey) (plaintext []byte, err error)
}
type AsymmetricSigner ¶
type AuthenticatedCipher ¶
type CipherOption ¶
type CipherOption interface {
Apply(*CipherOptions) error
}
type CipherOptions ¶
type SealService ¶
type SealService interface {
IssueSealer(algorithm string, bits int) (AsymmetricSealer, error)
Sealer(options ...SealerOption) (AsymmetricSealer, error)
IssueSigner(algorithm string, bits int) (AsymmetricSigner, error)
Signer(options ...SealerOption) (AsymmetricSigner, error)
AuthenticatedCipher(options ...CipherOption) (AuthenticatedCipher, error)
}
type SealerOption ¶
type SealerOption interface {
Apply(*SealerOptions) error
}
type SealerOptions ¶
type SealerOptions struct {
Algorithm string
PublicKey crypto.PublicKey
PrivateKey crypto.PrivateKey // optional
}
Click to show internal directories.
Click to hide internal directories.