Documentation
¶
Index ¶
- type PublicKeyCrypto
- func (ck *PublicKeyCrypto) Decrypt(input string) (string, error)
- func (ck *PublicKeyCrypto) Encrypt(input string) (string, error)
- func (ck *PublicKeyCrypto) GetPrivateKey() []byte
- func (ck *PublicKeyCrypto) GetPrivateKeyPKCS8() ([]byte, error)
- func (ck *PublicKeyCrypto) GetPublicKey() ([]byte, error)
- func (ck *PublicKeyCrypto) GetPublicKeyWithJWK() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublicKeyCrypto ¶
PublicKeyCrypto represents PublicKeyCrypto struct
func NewPublicKeyCrypto ¶
func NewPublicKeyCrypto(bits int) (*PublicKeyCrypto, error)
NewPublicKeyCrypto create PublicKeyCrypto struct
func NewPublicKeyCryptoWithJWKPublicKey ¶
func NewPublicKeyCryptoWithJWKPublicKey(publickey []byte) (*PublicKeyCrypto, error)
NewPublicKeyCryptoWithJWKPublicKey create PublicKeyCrypto struct with JWK Public Key
func NewPublicKeyCryptoWithPEMPublicKey ¶
func NewPublicKeyCryptoWithPEMPublicKey(publickey []byte) (*PublicKeyCrypto, error)
NewPublicKeyCryptoWithPEMPublicKey create PublicKeyCrypto struct with PEM Public Key
func (*PublicKeyCrypto) Decrypt ¶
func (ck *PublicKeyCrypto) Decrypt(input string) (string, error)
Decrypt decrypts input data with publickey encryption
func (*PublicKeyCrypto) Encrypt ¶
func (ck *PublicKeyCrypto) Encrypt(input string) (string, error)
Encrypt encrypts input data with publickey encryption
func (*PublicKeyCrypto) GetPrivateKey ¶
func (ck *PublicKeyCrypto) GetPrivateKey() []byte
GetPrivateKey gets privatekey
func (*PublicKeyCrypto) GetPrivateKeyPKCS8 ¶
func (ck *PublicKeyCrypto) GetPrivateKeyPKCS8() ([]byte, error)
GetPrivateKeyPKCS8 gets pkcs8 privatekey
func (*PublicKeyCrypto) GetPublicKey ¶
func (ck *PublicKeyCrypto) GetPublicKey() ([]byte, error)
GetPublicKey gets publickey
func (*PublicKeyCrypto) GetPublicKeyWithJWK ¶
func (ck *PublicKeyCrypto) GetPublicKeyWithJWK() ([]byte, error)
GetPublicKeyWithJWK gets jwk publickey
Click to show internal directories.
Click to hide internal directories.