Documentation ¶
Index ¶
- func ECDSAPublicKeyFromJwk(jwk map[string]any) (*ecdsa.PublicKey, error)
- func EllipticCurveSign(rand io.Reader, pk ecdsa.PrivateKey, digest []byte, keySize int) ([]byte, error)
- func ExtractRSFromSignature(signature []byte, keySize int) (*big.Int, *big.Int, error)
- func JwkFromECDSAPrivateKey(privateKey *ecdsa.PrivateKey) map[string]any
- func JwkFromECDSAPublicKey(publicKey *ecdsa.PublicKey) map[string]any
- func JwkFromRSAPrivateKey(privateKey *rsa.PrivateKey) map[string]any
- func JwkFromRSAPublicKey(publicKey *rsa.PublicKey) map[string]any
- func NewECDSAPublicKeyFromJson(publicKeyJson []byte, curve elliptic.Curve) (*ecdsa.PublicKey, error)
- func NewRSAPublicKeyFromJson(publicKeyJson []byte) (*rsa.PublicKey, error)
- func RSAPublicKeyFromJwk(jwk map[string]any) (*rsa.PublicKey, error)
- func RsaPSSSign(rand io.Reader, pk rsa.PrivateKey, digest []byte, hash crypto.Hash, ...) ([]byte, error)
- func RsaPkcs1Sign(rand io.Reader, pk rsa.PrivateKey, digest []byte, hash crypto.Hash) ([]byte, error)
- type ECDSAPublicKey
- type RSAPublicKey
- type SecretKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ECDSAPublicKeyFromJwk ¶ added in v0.9.0
func EllipticCurveSign ¶
func ExtractRSFromSignature ¶
func JwkFromECDSAPrivateKey ¶
func JwkFromECDSAPrivateKey(privateKey *ecdsa.PrivateKey) map[string]any
func JwkFromRSAPrivateKey ¶
func JwkFromRSAPrivateKey(privateKey *rsa.PrivateKey) map[string]any
func NewRSAPublicKeyFromJson ¶
func RSAPublicKeyFromJwk ¶ added in v0.9.0
func RsaPSSSign ¶
Types ¶
type ECDSAPublicKey ¶
type ECDSAPublicKey struct { Kty string `json:"kty"` Crv string `json:"crv"` X string `json:"x"` Y string `json:"y"` }
func (*ECDSAPublicKey) Equal ¶
func (pubKey *ECDSAPublicKey) Equal(x ECDSAPublicKey) bool
type RSAPublicKey ¶
func (*RSAPublicKey) Equal ¶
func (pubKey *RSAPublicKey) Equal(x RSAPublicKey) bool
Click to show internal directories.
Click to hide internal directories.