Documentation ¶
Index ¶
- func ConvertToEcdsaPublicFromJWK(key *jose.JSONWebKey) (*ecdsa.PublicKey, error)
- func ConvertToJSONWebKey(input []byte) (jose.JSONWebKey, error)
- func ConvertToRSAPrivateFromJWK(key *jose.JSONWebKey) (*rsa.PrivateKey, error)
- func ConvertToRSAPublicFromJWK(key *jose.JSONWebKey) (*rsa.PublicKey, error)
- func DecodeAuthorizedKey(input []byte, encryptkey *entity.EncryptKey) error
- func DecodePrivateKey(bytedata []byte, encryptkey *entity.EncryptKey) error
- func DecodePublicKey(bytedata []byte, encryptkey *entity.EncryptKey) error
- func EncodeED25519PublicKey(pubkey ed25519.PublicKey) ([]byte, error)
- func EncodeEcdsaPrivateKey(prikey *ecdsa.PrivateKey) ([]byte, error)
- func EncodeEcdsaPublicKey(pubkey *ecdsa.PublicKey) ([]byte, error)
- func EncodeEd25519PrivateKey(prikey ed25519.PrivateKey) ([]byte, error)
- func EncodePrivateKey(encryptkey *entity.EncryptKey) ([]byte, error)
- func EncodePublicKey(encryptkey *entity.EncryptKey) ([]byte, error)
- func EncodeRsaPrivateKeyPKCS1(prikey *rsa.PrivateKey) []byte
- func EncodeRsaPrivateKeyPKCS8(prikey *rsa.PrivateKey) ([]byte, error)
- func EncodeRsaPublicKey(pubkey *rsa.PublicKey) ([]byte, error)
- func GenerateHashFromCrptoKey(key interface{}) string
- func GenerateJSONWebKeyWithEcdsaPrivateKey(privatekey *ecdsa.PrivateKey, kid string) ([]byte, error)
- func GenerateJSONWebKeyWithEcdsaPublicKey(publickey *ecdsa.PublicKey, kid string) ([]byte, error)
- func GenerateJSONWebKeyWithEncryptPrivateKey(encryptkey *entity.EncryptKey, kid string) ([]byte, error)
- func GenerateJSONWebKeyWithEncryptPublicKey(encryptkey *entity.EncryptKey, kid string) ([]byte, error)
- func GenerateJSONWebKeyWithRSAPrivateKey(privatekey *rsa.PrivateKey, kid string) ([]byte, error)
- func GenerateJSONWebKeyWithRSAPublicKey(publickey *rsa.PublicKey, kid string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToEcdsaPublicFromJWK ¶ added in v0.1.1
func ConvertToEcdsaPublicFromJWK(key *jose.JSONWebKey) (*ecdsa.PublicKey, error)
ConvertToEcdsaPublicFromJWK convert to ECDSA public key from JWK
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 DecodeAuthorizedKey ¶ added in v0.1.2
func DecodeAuthorizedKey(input []byte, encryptkey *entity.EncryptKey) error
DecodeAuthorizedKey decodes authorizedkey to entity struct
func DecodePrivateKey ¶ added in v0.1.1
func DecodePrivateKey(bytedata []byte, encryptkey *entity.EncryptKey) error
DecodePrivateKey decodes private to entity struct
func DecodePublicKey ¶
func DecodePublicKey(bytedata []byte, encryptkey *entity.EncryptKey) error
DecodePublicKey decodes publickey to entity struct
func EncodeED25519PublicKey ¶ added in v0.1.2
EncodeED25519PublicKey encodes public key to bytes
func EncodeEcdsaPrivateKey ¶ added in v0.1.1
func EncodeEcdsaPrivateKey(prikey *ecdsa.PrivateKey) ([]byte, error)
EncodeEcdsaPrivateKey encodes ECDSA private key to bytes
func EncodeEcdsaPublicKey ¶ added in v0.1.1
EncodeEcdsaPublicKey encodes public key to bytes
func EncodeEd25519PrivateKey ¶ added in v0.1.2
func EncodeEd25519PrivateKey(prikey ed25519.PrivateKey) ([]byte, error)
EncodeEd25519PrivateKey encodes ED25519 private key to bytes
func EncodePrivateKey ¶ added in v0.1.2
func EncodePrivateKey(encryptkey *entity.EncryptKey) ([]byte, error)
EncodePrivateKey decodes private key to bytes
func EncodePublicKey ¶ added in v0.1.2
func EncodePublicKey(encryptkey *entity.EncryptKey) ([]byte, error)
EncodePublicKey encodes public key to bytes
func EncodeRsaPrivateKeyPKCS1 ¶ added in v0.1.1
func EncodeRsaPrivateKeyPKCS1(prikey *rsa.PrivateKey) []byte
EncodeRsaPrivateKeyPKCS1 encodes PKCS1 private key to bytes
func EncodeRsaPrivateKeyPKCS8 ¶ added in v0.1.1
func EncodeRsaPrivateKeyPKCS8(prikey *rsa.PrivateKey) ([]byte, error)
EncodeRsaPrivateKeyPKCS8 encodes PKCS8 private key to bytes
func EncodeRsaPublicKey ¶ added in v0.1.1
EncodeRsaPublicKey encodes public key to bytes
func GenerateHashFromCrptoKey ¶ added in v0.1.1
func GenerateHashFromCrptoKey(key interface{}) string
GenerateHashFromCrptoKey generates Hash from private / public key
func GenerateJSONWebKeyWithEcdsaPrivateKey ¶ added in v0.1.1
func GenerateJSONWebKeyWithEcdsaPrivateKey(privatekey *ecdsa.PrivateKey, kid string) ([]byte, error)
GenerateJSONWebKeyWithEcdsaPrivateKey convert ecdsa privatekey to JWK
func GenerateJSONWebKeyWithEcdsaPublicKey ¶ added in v0.1.1
GenerateJSONWebKeyWithEcdsaPublicKey convert ecdsa publickey to JWK
func GenerateJSONWebKeyWithEncryptPrivateKey ¶ added in v0.1.2
func GenerateJSONWebKeyWithEncryptPrivateKey(encryptkey *entity.EncryptKey, kid string) ([]byte, error)
GenerateJSONWebKeyWithEncryptPrivateKey convert privatekey to JWK
func GenerateJSONWebKeyWithEncryptPublicKey ¶ added in v0.1.2
func GenerateJSONWebKeyWithEncryptPublicKey(encryptkey *entity.EncryptKey, kid string) ([]byte, error)
GenerateJSONWebKeyWithEncryptPublicKey convert publickey to JWK
func GenerateJSONWebKeyWithRSAPrivateKey ¶
func GenerateJSONWebKeyWithRSAPrivateKey(privatekey *rsa.PrivateKey, kid string) ([]byte, error)
GenerateJSONWebKeyWithRSAPrivateKey convert rsa privatekey to JWK
Types ¶
This section is empty.