cryptoutil

package
v3.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecipherAes

func DecipherAes(key, iv, cipherBytes []byte) ([]byte, error)

DecipherAes deciphers AES-encrypted bytes

func DecryptReceiptContent added in v3.12.0

func DecryptReceiptContent(content, receiptContentKey []byte) ([]byte, error)

func DecryptToken

func DecryptToken(encryptedConnectToken string, key *rsa.PrivateKey) (result string, err error)

DecryptToken decrypts an RSA-encrypted token, using the specified RSA private key

func ParseRSAKey

func ParseRSAKey(keyBytes []byte) (*rsa.PrivateKey, error)

ParseRSAKey parses a PKCS1 private key from bytes

func UnwrapKey

func UnwrapKey(wrappedKey string, key *rsa.PrivateKey) (result []byte, err error)

UnwrapKey unwraps an RSA private key

func UnwrapReceiptKey added in v3.12.0

func UnwrapReceiptKey(wrappedReceiptKey []byte, encryptedItemKey []byte, itemKeyIv []byte, key *rsa.PrivateKey) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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