util

package
v0.0.0-...-37cb674 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright © 2021 kubelt

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const UnhandledException = `An unhandled exception occurred.`

Variables

This section is empty.

Functions

func Bytes32ToBytes

func Bytes32ToBytes(key *[32]byte) []byte

func GenerateEncryptionKeys

func GenerateEncryptionKeys() (*[32]byte, *[32]byte, error)

func GenerateSharedEncryptionKey

func GenerateSharedEncryptionKey(privateKey *[32]byte, publicKey *[32]byte) *[32]byte

GenerateKeyEncryptionKey uses the maintainers secret key to generate a shared encryption key. The shared encryption key is used to encrypt content. The receipient can then use their private key with the maintainers public key to generate the decryption key To generate encryption key the author/sender will use their private key and reciever's public key To generate a decrtyption key the reciver will use their private key and the author/sender's public key

func GenerateSigningKeys

func GenerateSigningKeys() (*[32]byte, *[64]byte, error)

func NewHelp

func NewHelp() *help

func Sign

func Sign(node []byte, key *[64]byte) []byte

func ValidateSignature

func ValidateSignature(signature []byte, key *[32]byte) bool

Types

type Help

type Help interface {
	Panic(string, ...interface{}) error
}

Jump to

Keyboard shortcuts

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