Documentation
¶
Index ¶
- type Crypt
- type Ed25519
- func (e *Ed25519) Init() error
- func (e *Ed25519) LoadPrivateKey() (*ed25519.PrivateKey, error)
- func (e *Ed25519) LoadPublicKey() (*ed25519.PublicKey, error)
- func (e *Ed25519) Provide(ctx context.Context) interface{}
- func (e *Ed25519) Sign(raw string) (string, error)
- func (e *Ed25519) Verify(plaintext, sign string) error
- type Ed25519Option
- type Ed25519Options
- type Rsa
- type RsaOption
- type RsaOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ed25519 ¶ added in v0.3.6
type Ed25519 struct {
// contains filtered or unexported fields
}
func NewEd25519 ¶ added in v0.3.6
func NewEd25519(opts ...Ed25519Option) *Ed25519
func (*Ed25519) LoadPrivateKey ¶ added in v0.3.6
func (e *Ed25519) LoadPrivateKey() (*ed25519.PrivateKey, error)
func (*Ed25519) LoadPublicKey ¶ added in v0.3.6
type Ed25519Option ¶ added in v0.3.6
type Ed25519Option func(*Ed25519Options)
func WithEd25519PrivateKey ¶ added in v0.3.6
func WithEd25519PrivateKey(privateKey string) Ed25519Option
func WithEd25519PrivateKeyFile ¶ added in v0.3.6
func WithEd25519PrivateKeyFile(privateKeyFile string) Ed25519Option
func WithEd25519PublicKey ¶ added in v0.3.6
func WithEd25519PublicKey(publicKey string) Ed25519Option
func WithEd25519PublicKeyFile ¶ added in v0.3.6
func WithEd25519PublicKeyFile(publicKeyFile string) Ed25519Option
type Ed25519Options ¶ added in v0.3.6
type Rsa ¶
type Rsa struct {
// contains filtered or unexported fields
}
func (*Rsa) LoadPrivateKey ¶
func (r *Rsa) LoadPrivateKey() (*rsa.PrivateKey, error)
type RsaOption ¶
type RsaOption func(*RsaOptions)
func WithPrivateKey ¶
func WithPrivateKeyFile ¶
func WithPublicKey ¶
func WithPublicKeyFile ¶
Click to show internal directories.
Click to hide internal directories.