Documentation ¶
Overview ¶
Package pkcs1 implements PKCS#1 RSA key marshalling/unmarshalling, compatibile with Tor's usage.
Index ¶
- func DecodePrivateKeyDER(b []byte) (*rsa.PrivateKey, []byte, error)
- func DecodePublicKeyDER(b []byte) (*rsa.PublicKey, []byte, error)
- func EncodePrivateKeyDER(sk *rsa.PrivateKey) ([]byte, error)
- func EncodePublicKeyDER(pk *rsa.PublicKey) ([]byte, error)
- func OnionAddr(pk *rsa.PublicKey) (string, error)
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 ¶
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 ¶
EncodePublicKeyDER returns the PKCS#1 DER encoding of a rsa.PublicKey.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.