Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_BLOCK_CYPHER = "AES" DEFAULT_BLOCK_CYPHER_MODE = "CBC" DEFAULT_HASH_FUNCTION = "SHA256" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptMethods ¶
type PrivateKey ¶
type PrivateKey struct { Version string Type string // rsa, el gamal,... Key *RSAPrivateKey Accept *AcceptMethods }
func GetDefaultRSAPrivateKey ¶
func GetDefaultRSAPrivateKey(privateKey *rsa.PrivateKey) (*PrivateKey, error)
type PublicKey ¶
type PublicKey struct { Type string // rsa, el gamal,... Version string Key *RSAPublicKey Accept *AcceptMethods }
func GetDefaultRSAPublicKey ¶
type RSAPrivateKey ¶
type RSAPrivateKey struct { N *big.Int `json:"n,omitempty"` P *big.Int `json:"p,omitempty"` Q *big.Int `json:"q,omitempty"` D *big.Int `json:"d,omitempty"` E int `json:"e,omitempty"` }
func NewRSAPrivateKey ¶
func NewRSAPrivateKey(key *rsa.PrivateKey) *RSAPrivateKey
func (*RSAPrivateKey) MarshalJSON ¶
func (this *RSAPrivateKey) MarshalJSON() ([]byte, error)
func (*RSAPrivateKey) UnmarshalJSON ¶
func (this *RSAPrivateKey) UnmarshalJSON(data []byte) error
type RSAPublicKey ¶
func NewRSAPublicKey ¶
func NewRSAPublicKey(key *rsa.PublicKey) *RSAPublicKey
func (*RSAPublicKey) MarshalJSON ¶
func (this *RSAPublicKey) MarshalJSON() ([]byte, error)
func (*RSAPublicKey) UnmarshalJSON ¶
func (this *RSAPublicKey) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.