parser

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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 DecodePrivateKey added in v0.1.1

func DecodePrivateKey(bytedata []byte, encryptkey *entity.EncryptKey) error

DecodePrivateKey reads private to entity struct

func DecodePublicKey

func DecodePublicKey(bytedata []byte, encryptkey *entity.EncryptKey) error

DecodePublicKey reads publickey to entity struct

func EncodeEcdsaPrivateKey added in v0.1.1

func EncodeEcdsaPrivateKey(prikey *ecdsa.PrivateKey) ([]byte, error)

EncodeEcdsaPrivateKey decodes ECDSA private key to bytes

func EncodeEcdsaPublicKey added in v0.1.1

func EncodeEcdsaPublicKey(pubkey *ecdsa.PublicKey) ([]byte, error)

EncodeEcdsaPublicKey decodes public key to bytes

func EncodeRsaPrivateKeyPKCS1 added in v0.1.1

func EncodeRsaPrivateKeyPKCS1(prikey *rsa.PrivateKey) []byte

EncodeRsaPrivateKeyPKCS1 decodes PKCS1 private key to bytes

func EncodeRsaPrivateKeyPKCS8 added in v0.1.1

func EncodeRsaPrivateKeyPKCS8(prikey *rsa.PrivateKey) ([]byte, error)

EncodeRsaPrivateKeyPKCS8 decodes PKCS8 private key to bytes

func EncodeRsaPublicKey added in v0.1.1

func EncodeRsaPublicKey(pubkey *rsa.PublicKey) ([]byte, error)

EncodeRsaPublicKey decodes 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

func GenerateJSONWebKeyWithEcdsaPublicKey(publickey *ecdsa.PublicKey, kid string) ([]byte, error)

GenerateJSONWebKeyWithEcdsaPublicKey convert ecdsa publickey to JWK

func GenerateJSONWebKeyWithRSAPrivateKey

func GenerateJSONWebKeyWithRSAPrivateKey(privatekey *rsa.PrivateKey, kid string) ([]byte, error)

GenerateJSONWebKeyWithRSAPrivateKey convert rsa privatekey to JWK

func GenerateJSONWebKeyWithRSAPublicKey

func GenerateJSONWebKeyWithRSAPublicKey(publickey *rsa.PublicKey, kid string) ([]byte, error)

GenerateJSONWebKeyWithRSAPublicKey convert rsa publickey to JWK

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL