utils

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B64Decode

func B64Decode(b64 string) ([]byte, error)

B64Decode attempts to decode the give string first as an RFC 4648 encoded string (with padding). If that fails, then RFC 4648 section 3.2 (without padding) is attempted. If RFC 4648 section 3.2 fails as well, then the original error message (with padding) is returned.

All provided strings are first trimmed of whitespace before attempting decoding.

func B64Encode

func B64Encode(src []byte) string

func RawSerialBytes added in v0.0.10

func RawSerialBytes(rawTBSCertificate []byte) ([]byte, error)

Extract the raw bytes of the serial number field from a tbsCertificate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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