Created
August 9, 2018 05:39
-
-
Save as/15fdf059b7c55c0867601e6c69ad97d1 to your computer and use it in GitHub Desktop.
"A challenge: to create a source code that contains a valid link to itself"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
"io" | |
) | |
var x = string(0x60) | |
func main() { | |
h := sha256.New() | |
io.WriteString(h, "Go playground salt\n") | |
io.WriteString(h, p) | |
io.WriteString(h, x) | |
io.WriteString(h, p) | |
io.WriteString(h, x) | |
sum := h.Sum(nil) | |
b := make([]byte, 10000) | |
base64.URLEncoding.Encode(b, sum) | |
fmt.Println("zerkms: A challenge: to create a source code that contains a valid link to itself") | |
fmt.Printf("@zerkms -> https://play.golang.org/p/%s", b[:11]) | |
} | |
const p = `package main | |
import ( | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
"io" | |
) | |
var x = string(0x60) | |
func main() { | |
h := sha256.New() | |
io.WriteString(h, "Go playground salt\n") | |
io.WriteString(h, p) | |
io.WriteString(h, x) | |
io.WriteString(h, p) | |
io.WriteString(h, x) | |
sum := h.Sum(nil) | |
b := make([]byte, 10000) | |
base64.URLEncoding.Encode(b, sum) | |
fmt.Println("zerkms: A challenge: to create a source code that contains a valid link to itself") | |
fmt.Printf("@zerkms -> https://play.golang.org/p/%s", b[:11]) | |
} | |
const p = ` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment