Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (30 sloc) 662 Bytes
package main
import (
"crypto/sha256"
"encoding/base64"
"fmt"
"strconv"
)
/*
#######################################
#### http://blog.mustafaakseli.com ####
#######################################
*/
func encryptPassword(password string) string {
h := sha256.New()
h.Write([]byte(password))
b := h.Sum(nil)
return base64.StdEncoding.EncodeToString(b)
}
func main() {
su := "deneme0deger"
if false {
fmt.Println("'tekbiir' degeri sifreli hali --> ", encryptPassword("tekbiir"))
}else{
for i := 0; i < 10; i++ {
su = "deger" + strconv.Itoa(i) + "sonraki"
//fmt.Println(su)
fmt.Println( su , " -",i,"-> " , encryptPassword(su))
}
}
}
You can’t perform that action at this time.