diff --git a/main.go b/main.go index fe434a8..c2a77a8 100644 --- a/main.go +++ b/main.go @@ -122,7 +122,7 @@ func main() { var vig = &cobra.Command{ Use: "vig", - Short: "vignenere cipher", + Short: "vigenere cipher", Long: `perform vigenere cipher`, Run: func(cmd *cobra.Command, args []string) { if len(args) < 1 || key == "" { diff --git a/psyfer/aes.go b/psyfer/aes.go index 9f452e1..b885748 100644 --- a/psyfer/aes.go +++ b/psyfer/aes.go @@ -118,7 +118,12 @@ func BlockGen(arg string) []Block { all := []Block{} b := Block{} for i, char := range arg { - value, err := strconv.Atoi(hex.EncodeToString([]byte(string(char)))) + value, err := strconv.ParseUint( + hex.EncodeToString( + []byte(string(char))), + 16, + 32, + ) if err != nil { log.Fatal(err) }