rsa

package
v0.0.0-...-b6f29c3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RsaKeyPair = &RSA{new(big.Int), new(big.Int), new(big.Int)}

512bit, 204 JaGEX protoc`pted block becomes 64 bytes long minimum

Functions

This section is empty.

Types

type RSA

type RSA struct {
	Private, Public, Modulus *big.Int
}

func (*RSA) Decrypt

func (r *RSA) Decrypt(data []byte) []byte

Encrypt Takes a slice of bytes, converts it into a big endian integer, does some math to it to obscure the contents, then converts it to a byte slice to return to the caller.

func (*RSA) Encrypt

func (r *RSA) Encrypt(data []byte) []byte

Encrypt Takes a slice of bytes, converts it into a big endian integer, does some math to it to obscure the contents, then converts it to a byte slice to return to the caller.

Jump to

Keyboard shortcuts

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