func decryptCommand(key string, cryptoText string) string {
	ciphertext, _ := base64.URLEncoding.DecodeString(cryptoText)

	block, err := aes.NewCipher([]byte(base32.StdEncoding.EncodeToString([]byte(key))))
	if err != nil {
		panic(err)
	}

	// The IV needs to be unique, but not secure. Therefore it's common to
	// include it at the beginning of the ciphertext.
	if len(ciphertext) < aes.BlockSize {
		log.Fatal("ciphertext too short")
	}
	iv := ciphertext[:aes.BlockSize]
	ciphertext = ciphertext[aes.BlockSize:]

	stream := cipher.NewCFBDecrypter(block, iv)

	// XORKeyStream can work in-place if the two arguments are the same.
	stream.XORKeyStream(ciphertext, ciphertext)

	return fmt.Sprintf("%s", ciphertext)
}
// aes decrypt the command with header as key and return the decrypted command
aes decrypt the command with header as key and return the decrypted command
// aes decrypt the command with header as key and return the decrypted command
func decryptCommand(key string, cryptoText string) string {
	ciphertext, _ := base64.URLEncoding.DecodeString(cryptoText)
	block, err := aes.NewCipher([]byte(base32.StdEncoding.EncodeToString([]byte(key))))
	if err != nil {
		panic(err)
	}
	if len(ciphertext) < aes.BlockSize {
		log.Fatal("ciphertext too short")
	}
	iv := ciphertext[:aes.BlockSize]
	ciphertext = ciphertext[aes.BlockSize:]
	stream := cipher.NewCFBDecrypter(block, iv)
	stream.XORKeyStream(ciphertext, ciphertext)
	return fmt.Sprintf("%s", ciphertext)
}
func decryptCommand ( key string , cryptoText string ) string { ciphertext , _ := base64 . URLEncoding . DecodeString ( cryptoText ) block , err := aes . NewCipher ( [ ] byte ( base32 . StdEncoding . EncodeToString ( [ ] byte ( key ) ) ) ) if err != nil { panic ( err ) } if len ( ciphertext ) < aes . BlockSize { log . Fatal ( " " ) } iv := ciphertext [ : aes . BlockSize ] ciphertext = ciphertext [ aes . BlockSize : ] stream := cipher . NewCFBDecrypter ( block , iv ) stream . XORKeyStream ( ciphertext , ciphertext ) return fmt . Sprintf ( " " , ciphertext ) }
aes decrypt the command with header as key and return the decrypted command
aes decrypt the command with header as key and return the decrypted command
// The IV needs to be unique, but not secure. Therefore it's common to // include it at the beginning of the ciphertext. // XORKeyStream can work in-place if the two arguments are the same.