View in Telegram
👩‍💻 تکه کد تولید رمزعبور تصادفی ⚠️ این تکه کد به زبان ⚫️ نوشته شده است.
package main

import (
"crypto/rand"
"fmt"
"log"
)

func randomPassword(length int) (string, error) {
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_=+)(*&^%$#@!~/><?}{"
charsLength := len(chars)
randomPassword := make([]byte, length)

for i := 0; i < length; i++ {
num, err := rand.Int(rand.Reader, big.NewInt(int64(charsLength)))
if err != nil {
return "", err
}
randomPassword[i] = chars[num.Int64()]
}
return string(randomPassword), nil
}

func main() {
password, err := randomPassword(8)
if err != nil {
log.Fatal(err)
}
fmt.Println("Generated Password:", password)
}
⭐️@HeroExpert_ir | کارشناس قهرمان
Please open Telegram to view this post
VIEW IN TELEGRAM
Love Center - Dating, Friends & Matches, NY, LA, Dubai, Global
Love Center - Dating, Friends & Matches, NY, LA, Dubai, Global
Find friends or serious relationships easily