hashchatid

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 4 Imported by: 0

README

HashChatID

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 HashChatID in your Go project:

package main

import (
	"fmt"
	hcid "github.com/Lacolle87/hashchatid"
)

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashChatID

func HashChatID(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