Documentation
¶
Index ¶
- func ConvertToJSONWebKey(input []byte) (jose.JSONWebKey, error)
- func ConvertToRSAPrivateFromJWK(key *jose.JSONWebKey) (*rsa.PrivateKey, error)
- func ConvertToRSAPublicFromJWK(key *jose.JSONWebKey) (*rsa.PublicKey, error)
- func DecodePrivateKeyPKCS1(pubkey *rsa.PrivateKey) []byte
- func DecodePrivateKeyPKCS8(pubkey *rsa.PrivateKey) ([]byte, error)
- func DecodePublicKey(pubkey *rsa.PublicKey) ([]byte, error)
- func GenerateHashFromRsaKey(key interface{}) string
- func GenerateJSONWebKeyWithRSAPrivateKey(privatekey *rsa.PrivateKey, kid string) ([]byte, error)
- func GenerateJSONWebKeyWithRSAPublicKey(publickey *rsa.PublicKey, kid string) ([]byte, error)
- func ReadPrivateKey(bytedata []byte, rsakey *entity.RsaKey) error
- func ReadPublicKey(bytedata []byte, rsakey *entity.RsaKey) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToJSONWebKey ¶
func ConvertToJSONWebKey(input []byte) (jose.JSONWebKey, error)
ConvertToJSONWebKey convert to JWK
func ConvertToRSAPrivateFromJWK ¶
func ConvertToRSAPrivateFromJWK(key *jose.JSONWebKey) (*rsa.PrivateKey, error)
ConvertToRSAPrivateFromJWK convert to RSA private key from JWK
func ConvertToRSAPublicFromJWK ¶
func ConvertToRSAPublicFromJWK(key *jose.JSONWebKey) (*rsa.PublicKey, error)
ConvertToRSAPublicFromJWK convert to RSA public key from JWK
func DecodePrivateKeyPKCS1 ¶
func DecodePrivateKeyPKCS1(pubkey *rsa.PrivateKey) []byte
DecodePrivateKeyPKCS1 decodes PKCS1 private key to bytes
func DecodePrivateKeyPKCS8 ¶
func DecodePrivateKeyPKCS8(pubkey *rsa.PrivateKey) ([]byte, error)
DecodePrivateKeyPKCS8 decodes PKCS8 private key to bytes
func DecodePublicKey ¶
DecodePublicKey decodes public key to bytes
func GenerateHashFromRsaKey ¶
func GenerateHashFromRsaKey(key interface{}) string
GenerateHashFromRsaKey generates Hash from RSA provate / public key
func GenerateJSONWebKeyWithRSAPrivateKey ¶
func GenerateJSONWebKeyWithRSAPrivateKey(privatekey *rsa.PrivateKey, kid string) ([]byte, error)
GenerateJSONWebKeyWithRSAPrivateKey convert rsa privatekey to JWK
func GenerateJSONWebKeyWithRSAPublicKey ¶
GenerateJSONWebKeyWithRSAPublicKey convert rsa publickey to JWK
func ReadPrivateKey ¶
ReadPrivateKey reads private to entity struct
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.