rfc3962

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package rfc3962 provides encryption and checksum methods as specified in RFC 3962

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptData

func DecryptData(key, data []byte, e etype.EType) ([]byte, error)

DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 3962.

func DecryptMessage

func DecryptMessage(key, ciphertext []byte, usage uint32, e etype.EType) ([]byte, error)

DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 3962. The integrity of the message is also verified.

func EncryptData

func EncryptData(key, data []byte, e etype.EType) ([]byte, []byte, error)

EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 3962.

func EncryptMessage

func EncryptMessage(key, message []byte, usage uint32, e etype.EType) ([]byte, []byte, error)

EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 3962. The encrypted data is concatenated with its integrity hash to create an encrypted message.

func StringToKey

func StringToKey(secret, salt, s2kparams string, e etype.EType) ([]byte, error)

StringToKey returns a key derived from the string provided according to the definition in RFC 3961.

func StringToKeyIter

func StringToKeyIter(secret, salt string, iterations int, e etype.EType) ([]byte, error)

StringToKeyIter returns a key derived from the string provided according to the definition in RFC 3961.

func StringToPBKDF2

func StringToPBKDF2(secret, salt string, iterations int, e etype.EType) []byte

StringToPBKDF2 generates an encryption key from a pass phrase and salt string using the PBKDF2 function from PKCS #5 v2.0

Types

This section is empty.

Jump to

Keyboard shortcuts

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