hashid

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 4 Imported by: 0

README

HashID

HashChatID is a Go package that provides a simple utility function for hashing integer chat IDs using the SHA-256 cryptographic hash function. This package is useful for scenarios where you need to anonymize or obfuscate chat IDs or similar identifiers, ensuring privacy and security in your applications.

Features

  • Hashes integer chat IDs using SHA-256 for secure anonymization.
  • Converts integer chat IDs to hexadecimal strings for ease of use and storage.
  • Lightweight and easy to integrate into existing Go projects.

Installation

To use HashID in your Go project:

package main

import (
	"fmt"
	hid "github.com/Lacolle87/hashID"
)

func main() {
	chatID := int64(1234567890)
	hashedID := hid.HashID(chatID)
	fmt.Println("Hashed Chat ID:", hashedID)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashID added in v0.1.3

func HashID(id int64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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