Documentation ¶
Index ¶
- Constants
- func GenerateKeypair() (*PrivateKey, *PublicKey)
- func NewPSSOptions() *rsa.PSSOptions
- type PrivateKey
- func (priv *PrivateKey) Bytes() []byte
- func (_ *PrivateKey) IsPrivateKey()
- func (priv *PrivateKey) MarshalPEM() []byte
- func (priv *PrivateKey) Public() crypto.PublicKey
- func (priv *PrivateKey) Sign(message []byte) crypto.Signature
- func (priv *PrivateKey) String() string
- func (priv *PrivateKey) UnmarshalPEM(pem []byte) error
- type PublicKey
- func (pub *PublicKey) Bytes() []byte
- func (pub *PublicKey) Equals(other crypto.PublicKey) bool
- func (pub *PublicKey) FromBytes(p []byte) error
- func (pub *PublicKey) FromString(str string) error
- func (_ *PublicKey) IsPublicKey()
- func (pub *PublicKey) MarshalJSON() ([]byte, error)
- func (pub *PublicKey) MarshalPEM() []byte
- func (pub *PublicKey) String() string
- func (pub *PublicKey) UnmarshalJSON(inner []byte) error
- func (pub *PublicKey) UnmarshalPEM(pem []byte) error
- func (pub *PublicKey) Verify(message []byte, sig crypto.Signature) bool
- type Signature
- func (sig *Signature) Bytes() []byte
- func (sig *Signature) Equals(other crypto.Signature) bool
- func (sig *Signature) FromBytes(p []byte) error
- func (sig *Signature) FromString(str string) error
- func (_ *Signature) IsSignature()
- func (sig *Signature) MarshalJSON() ([]byte, error)
- func (sig *Signature) String() string
- func (sig *Signature) UnmarshalJSON(inner []byte) error
Constants ¶
View Source
const ( E = 65537 KEY_SIZE = 128 PRIVKEY = "RSA PRIVATE KEY" PUBKEY = "RSA PUBLIC KEY" SALT_SIZE = 32 SIGNATURE_SIZE = KEY_SIZE )
Variables ¶
This section is empty.
Functions ¶
func GenerateKeypair ¶
func GenerateKeypair() (*PrivateKey, *PublicKey)
func NewPSSOptions ¶
func NewPSSOptions() *rsa.PSSOptions
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func NewPrivateKey ¶
func NewPrivateKey(inner rsa.PrivateKey) *PrivateKey
func (*PrivateKey) Bytes ¶
func (priv *PrivateKey) Bytes() []byte
func (*PrivateKey) IsPrivateKey ¶
func (_ *PrivateKey) IsPrivateKey()
func (*PrivateKey) MarshalPEM ¶
func (priv *PrivateKey) MarshalPEM() []byte
func (*PrivateKey) Public ¶
func (priv *PrivateKey) Public() crypto.PublicKey
func (*PrivateKey) String ¶
func (priv *PrivateKey) String() string
func (*PrivateKey) UnmarshalPEM ¶
func (priv *PrivateKey) UnmarshalPEM(pem []byte) error
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func NewPublicKey ¶
func (*PublicKey) FromString ¶
func (*PublicKey) IsPublicKey ¶
func (_ *PublicKey) IsPublicKey()
func (*PublicKey) MarshalJSON ¶
func (*PublicKey) MarshalPEM ¶
func (*PublicKey) UnmarshalJSON ¶
func (*PublicKey) UnmarshalPEM ¶
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
func NewSignature ¶
func (*Signature) FromString ¶
func (*Signature) IsSignature ¶
func (_ *Signature) IsSignature()
func (*Signature) MarshalJSON ¶
func (*Signature) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.