Documentation ¶
Index ¶
- type Sha256Signer
- func (signer Sha256Signer) Sign(s Signable, key string) ([]byte, error)
- func (signer Sha256Signer) SignToBase64(s Signable, private_key string) (string, error)
- func (signer Sha256Signer) Verify(s Signable, sign []byte, pubkey string) (bool, error)
- func (signer Sha256Signer) VerifyFromBase64(s Signable, sign string, pubkey string) (bool, error)
- type Signable
- type Signer
- type SignerType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sha256Signer ¶
type Sha256Signer struct { }
func (Sha256Signer) SignToBase64 ¶
func (signer Sha256Signer) SignToBase64(s Signable, private_key string) (string, error)
func (Sha256Signer) VerifyFromBase64 ¶
type Signer ¶
type Signer interface { Sign(s Signable, privkey string) ([]byte, error) SignToBase64(s Signable, privkey string) (string, error) Verify(s Signable, sign []byte, pubkey string) (bool, error) VerifyFromBase64(s Signable, sign string, pubkey string) (bool, error) }
func New ¶
func New(t SignerType) Signer
Click to show internal directories.
Click to hide internal directories.