crypto

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const BASE58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
View Source
const PREFIX rune = '1'

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(crypted, key []byte) ([]byte, error)

AESDecrypt decrypts the encrypted source with the given key.

func AESEncrypt

func AESEncrypt(src, key []byte) ([]byte, error)

AESEncrypt encrypts the key with the given source.

func Base58CheckDecode

func Base58CheckDecode(input string) ([]byte, error)

Base58CheckDecode ...

func Base58CheckEncode

func Base58CheckEncode(input []byte) string

Base58CheckEncode ...

func Decode

func Decode(input string) ([]byte, error)

Decode...

func Encode

func Encode(input []byte) string

Encode ... ref: neo/Cryptography/Base58.cs

func Hash160

func Hash160(ba []byte) []byte

Hash160 first calculate SHA-256 hash result of ba, then RIPEMD-160 hash of the result

func Hash256

func Hash256(ba []byte) []byte

Hash256 gets the twice SHA-256 hash value of ba

func Sha256

func Sha256(b []byte) []byte

Sha256 gets the SHA-256 hash value of b

Types

This section is empty.

Jump to

Keyboard shortcuts

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