pass

package
v0.0.0-...-b173b6e Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: MIT Imports: 1 Imported by: 0

README

Componenta / Pass

Хеширование паролей по алгоритму Blowfish.

package main

import (
    "fmt"
    "github.com/AlexanderGrom/componenta/pass"
    "log"
)

func main() {
    p := pass.New("String")
    h, err := p.Hash("Password")
    
    if err != nil {
        log.Fatalln("Pass:", err)
    }
    
    if p.Compare(h, "Password") {
        fmt.Println("Compare!")
    }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pass

type Pass struct {
}

func (*Pass) Compare

func (self *Pass) Compare(h, p string) bool

Сверяет хеш со строкой

func (*Pass) Hash

func (self *Pass) Hash(p string) (string, error)

Хеширует строку

Jump to

Keyboard shortcuts

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