descrypt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package descrypt provides low-level access to DES crypt functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeInt

func DecodeInt(b []byte) uint32

DecodeInt converts up to a maximum of 4 bytes from b consisting of the hash alphabet to a 24-bit number.

func EncodeInt

func EncodeInt(val uint32) []byte

EncodeInt converts the 24-bit number from val up to a maximum of 4 bytes consisting of the hash alphabet.

func Encrypt

func Encrypt(key, input uint64, salt uint32, rounds uint32) uint64

Encrypt encrypts single block of data using DES, operates on 64-bit integers.

func Key

func Key(password []byte) uint64

Key converts up to a maximum of 8 bytes from password to a 56-bit DES key. Only 7 lowest bits of each byte of password is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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