parser

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 16 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 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

func EncodeED25519PublicKey(pubkey *ed25519.PublicKey) ([]byte, error)

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

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

EncodeEcdsaPublicKey encodes public key to bytes

func EncodeEd25519PrivateKey added in v0.1.2

func EncodeEd25519PrivateKey(prikey *ed25519.PrivateKey) []byte

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

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

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

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

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

func GenerateJSONWebKeyWithRSAPublicKey

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

GenerateJSONWebKeyWithRSAPublicKey convert rsa publickey to JWK

func MarshalED25519PrivateKey added in v0.2.0

func MarshalED25519PrivateKey(key *ed25519.PrivateKey) []byte

MarshalED25519PrivateKey marshal ED25519 privatekey to bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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