algo

package
v1.327.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

type Cipher interface {
	// Encrypt a msg.
	Encrypt(msg string) (string, error)

	// Decrypt a msg.
	Decrypt(msg string) (string, error)
}

Cipher for algo.

type NoCipher

type NoCipher struct{}

NoCipher for algo.

func (*NoCipher) Decrypt

func (*NoCipher) Decrypt(msg string) (string, error)

func (*NoCipher) Encrypt

func (*NoCipher) Encrypt(msg string) (string, error)

type NoSigner

type NoSigner struct{}

NoSigner for algo.

func (*NoSigner) Sign

func (*NoSigner) Sign(msg string) (string, error)

func (*NoSigner) Verify

func (*NoSigner) Verify(_, _ string) error

type Signer

type Signer interface {
	// Sign a message.
	Sign(msg string) (string, error)

	// Verify sig with msg.
	Verify(sig, msg string) error
}

Signer for algo.

Jump to

Keyboard shortcuts

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