parser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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

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

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

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

GenerateJSONWebKeyWithRSAPublicKey convert rsa publickey to JWK

func ReadPrivateKey

func ReadPrivateKey(bytedata []byte, rsakey *entity.RsaKey) error

ReadPrivateKey reads private to entity struct

func ReadPublicKey

func ReadPublicKey(bytedata []byte, rsakey *entity.RsaKey) error

ReadPublicKey reads publickey to entity struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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