utils

package module
v0.0.0-...-8d72f26 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

README

Just random utils that i use for my projects...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRSAKey

func GenerateRSAKey(path string) (*rsa.PrivateKey, error)

func GenerateRandomString

func GenerateRandomString(n int) string

Cool random function stolen from https://stackoverflow.com/a/31832326 that uses some black magic.

func GetPublicKeyPem

func GetPublicKeyPem(privateKey *rsa.PrivateKey) (string, error)

func ReadRSAKeyFromFile

func ReadRSAKeyFromFile(path string) (*rsa.PrivateKey, error)

func SignWithRSA

func SignWithRSA(data []byte, privateKey *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