encrypt

package
v0.0.0-...-b193c95 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Force = 90
	Smart = 91
)

Variables

View Source
var Lack_Args_ERR = fmt.Errorf("lack args")

Functions

func Generate_RSA_KeyPair

func Generate_RSA_KeyPair(parent_path string, bits int) ([]byte, []byte, error)

generate rsa key pair

func RSA_Sign

func RSA_Sign(cipher Cryptor, src []byte) (ans []byte, err error)

func RSA_Verify

func RSA_Verify(cipher Cryptor, src, sig []byte) error

func Register_Cipher

func Register_Cipher(name string, regfunc regfunchandle, mod int8) bool

Types

type Cryptor

type Cryptor interface {
	Encrpyt(src []byte) (ans []byte, err error)
	Decrpyt(src []byte) (ans []byte, err error)
}

func GetCryptor

func GetCryptor(name string, keypair ...any) (ans Cryptor, err error)

Jump to

Keyboard shortcuts

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