pkcs1

package
v0.0.0-...-85d80d8 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pkcs1 implements PKCS#1 RSA key marshalling/unmarshalling, compatibile with Tor's usage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePrivateKeyDER

func DecodePrivateKeyDER(b []byte) (*rsa.PrivateKey, []byte, error)

DecodePrivateKeyDER returns the rsa.PrivateKey decoding of a PKCS#1 DER blob.

func DecodePublicKeyDER

func DecodePublicKeyDER(b []byte) (*rsa.PublicKey, []byte, error)

DecodePublicKeyDER returns the rsa.PublicKey decoding of a PKCS#1 DER blob.

func EncodePrivateKeyDER

func EncodePrivateKeyDER(sk *rsa.PrivateKey) ([]byte, error)

EncodePrivateKeyDER returns the PKCS#1 DER encoding of a rsa.PrivateKey.

func EncodePublicKeyDER

func EncodePublicKeyDER(pk *rsa.PublicKey) ([]byte, error)

EncodePublicKeyDER returns the PKCS#1 DER encoding of a rsa.PublicKey.

func OnionAddr

func OnionAddr(pk *rsa.PublicKey) (string, error)

OnionAddr returns the Tor Onion Service address corresponding to a given rsa.PublicKey.

Types

This section is empty.

Jump to

Keyboard shortcuts

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