secret

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRSAKeyPair

func GenRSAKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)

GenRSAKeyPair create rsa key pair

func GenRSAPrivateKey

func GenRSAPrivateKey(bits int) ([]byte, error)

GenRSAPrivateKey generate a rsa private key

func ParseRSAPPublicKey

func ParseRSAPPublicKey(key string) (*rsa.PublicKey, error)

ParseRSAPPublicKey convert string to pub key

func ParseRSAPrivateKey

func ParseRSAPrivateKey(key string) (*rsa.PrivateKey, error)

ParseRSAPrivateKey convert string to private key

func RSAPrivate2Bytes

func RSAPrivate2Bytes(privateKey *rsa.PrivateKey) ([]byte, error)

RSAPrivate2Bytes expose bytes of private key

func RSAPublicKey2Bytes

func RSAPublicKey2Bytes(publicKey *rsa.PublicKey) ([]byte, error)

RSAPublicKey2Bytes expose bytes of public key

Types

This section is empty.

Jump to

Keyboard shortcuts

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