cryptotools

package module
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: 2 Imported by: 0

README

Build Status GitHub release go.dev reference Test Coverage Go Report Card MIT License

cryptotools

CryptoTools provides Encryption Tools with Common Key and Public Key.

Install

$ go get -u github.com/howood/cryptotools

Usage

See examples

Documentation

Index

Constants

View Source
const (
	// EncryptTypeRSA is RSA KeyType
	EncryptTypeRSA publickeycrypto.EncryptKeyType = publickeycrypto.EncryptTypeRSA
	// EncryptTypeECDSA is ECDSASA KeyType
	EncryptTypeECDSA publickeycrypto.EncryptKeyType = publickeycrypto.EncryptTypeECDSA
	// EncryptTypeED25519 is ED25519 KeyType
	EncryptTypeED25519 publickeycrypto.EncryptKeyType = publickeycrypto.EncryptTypeED25519
)

Variables

This section is empty.

Functions

func NewCommonKeyCrypto

func NewCommonKeyCrypto(commonKey []byte) (*commonkeycrypto.CommonKeyCrypto, error)

NewCommonKeyCrypto create CommonKeyCrypto

func NewPublicKeyCrypto

func NewPublicKeyCrypto(bits int, encryptType publickeycrypto.EncryptKeyType) (*publickeycrypto.PublicKeyCrypto, error)

NewPublicKeyCrypto create PublicKeyCrypto

func NewPublicKeyCryptoWithJWKPublicKey

func NewPublicKeyCryptoWithJWKPublicKey(publickey []byte, encryptType publickeycrypto.EncryptKeyType) (*publickeycrypto.PublicKeyCrypto, error)

NewPublicKeyCryptoWithJWKPublicKey create PublicKeyCrypto with JWK PublicKey

func NewPublicKeyCryptoWithPEMPublicKey

func NewPublicKeyCryptoWithPEMPublicKey(publickey []byte, encryptType publickeycrypto.EncryptKeyType) (*publickeycrypto.PublicKeyCrypto, error)

NewPublicKeyCryptoWithPEMPublicKey create PublicKeyCrypto with PEM PublicKey

Types

This section is empty.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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