rsautil

package
v0.40.10 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignRS256

func SignRS256(r *rsa.PrivateKey, data []byte) ([]byte, error)

SignRS256 signs data with rsa-sha256

func SignRS384

func SignRS384(r *rsa.PrivateKey, data []byte) ([]byte, error)

SignRS384 signs data with rsa-sha384

func SignRS512

func SignRS512(r *rsa.PrivateKey, data []byte) ([]byte, error)

SignRS512 signs data with rsa-sha512

func SignRS512Base64

func SignRS512Base64(r *rsa.PrivateKey, data []byte) (string, error)

SignRS512 signs data with rsa-sha512

Types

type CryptorOAEP

type CryptorOAEP struct {
	Hash          hash.Hash
	RsaPrivateKey *rsa.PrivateKey
	RsaPublicKey  *rsa.PublicKey
}

func NewCryptorOAEP

func NewCryptorOAEP() CryptorOAEP

func (*CryptorOAEP) DecryptOAEP

func (enc *CryptorOAEP) DecryptOAEP(ciphertextBytes []byte, label []byte) ([]byte, error)

func (*CryptorOAEP) DecryptOAEPBase64String

func (enc *CryptorOAEP) DecryptOAEPBase64String(ciphertextBase64 string, label []byte) ([]byte, error)

func (*CryptorOAEP) DecryptOAEPBase64StringFromPath

func (enc *CryptorOAEP) DecryptOAEPBase64StringFromPath(ciphertextBase64Path string, label []byte) ([]byte, error)

func (*CryptorOAEP) EncryptOAEP

func (enc *CryptorOAEP) EncryptOAEP(plaintextBytes []byte, label []byte) ([]byte, error)

func (*CryptorOAEP) EncryptOAEPToBase64String

func (enc *CryptorOAEP) EncryptOAEPToBase64String(plaintextBytes []byte, label []byte) (string, error)

Jump to

Keyboard shortcuts

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