encryptor

package
v0.0.0-...-8ab94dc Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package encryptor - NekoBlog backend server data encryptors Copyright (c) [2024], Author(s): - WhitePaper233<baizhiwp@gmail.com>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashPassword

func CompareHashPassword(hashedPassword string, password string, salt string) error

CompareHashPassword 比较哈希密码。

参数:

  • hashedPassword:哈希密码
  • password:密码
  • salt:盐

返回值:

  • error:如果密码匹配,则返回nil,否则返回相应的错误信息。

func HashPassword

func HashPassword(password string, salt string) (string, error)

HashPassword 生成哈希密码。

参数:

  • password:密码
  • salt:盐

返回值:

  • string:生成的哈希密码。
  • error:如果在生成哈希密码的过程中发生错误,则返回相应的错误信息,否则返回nil。

Types

This section is empty.

Jump to

Keyboard shortcuts

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