func AESECBDecrypt(key, cipherText []byte) ([]byte, error) {
	fmt.Println("AES-ECB: cipherText Length: ", len(cipherText))
	if len(cipherText)%aes.BlockSize != 0 {
		panic("Input not full blocks")
	}

	block, err := aes.NewCipher(key)
	if err != nil {
		return nil, err
	}

	plainText := make([]byte, len(cipherText))
	size := aes.BlockSize

	for bs, be := 0, size; bs < len(plainText); bs, be = bs+size, be+size {
		block.Decrypt(plainText[bs:be], cipherText[bs:be])
	}

	return plainText, nil
}
// AESECBDecrypt is given key to decrypt the cipherText in AES ECB way.
AESECBDecrypt is given key to decrypt the cipherText in AES ECB way.
// AESECBDecrypt is given key to decrypt the cipherText in AES ECB way .
func AESECBDecrypt(key, cipherText []byte) ([]byte, error) {
	fmt.Println("AES-ECB: cipherText Length: ", len(cipherText))
	if len(cipherText)%aes.BlockSize != 0 {
		panic("Input not full blocks")
	}
	block, err := aes.NewCipher(key)
	if err != nil {
		return nil, err
	}
	plainText := make([]byte, len(cipherText))
	size := aes.BlockSize
	for bs, be := 0, size; bs < len(plainText); bs, be = bs+size, be+size {
		block.Decrypt(plainText[bs:be], cipherText[bs:be])
	}
	return plainText, nil
}
func AESECBDecrypt ( key , cipherText [ ] byte ) ( [ ] byte , error ) { fmt . Println ( " " , len ( cipherText ) ) if len ( cipherText ) % aes . BlockSize != 0 { panic ( " " ) } block , err := aes . NewCipher ( key ) if err != nil { return nil , err } plainText := make ( [ ] byte , len ( cipherText ) ) size := aes . BlockSize for bs , be := 0 , size ; bs < len ( plainText ) ; bs , be = bs + size , be + size { block . Decrypt ( plainText [ bs : be ] , cipherText [ bs : be ] ) } return plainText , nil }
AESECBDecrypt is given key to decrypt the cipherText in AES ECB way.
AESECBDecrypt is given key to decrypt the cipherText in AES ECB way .