Created
February 1, 2019 14:16
-
-
Save melkael/4ff06836c77682d100289b2f876e16e2 to your computer and use it in GitHub Desktop.
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 "fmt" | |
import b64 "encoding/base64" | |
import hex "encoding/hex" | |
func hex_to_base64(hex_s string) string { | |
bytes, _ := hex.DecodeString(hex_s) | |
sEnc := b64.StdEncoding.EncodeToString(bytes) | |
return sEnc | |
} | |
func main() { | |
fmt.Println("challenge 1 : ", hex_to_base64("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment