func AESECBEncrypt(key, plainText []byte) ([]byte, error) {
	fmt.Println("AES-ECB Encrpypt: PlainText Length: ", len(plainText))
	if len(plainText)%aes.BlockSize != 0 {
		panic("Need a multiple of the blocksize")
	}
	block, err := aes.NewCipher(key)
	if err != nil {
		return nil, err
	}

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

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

	return cipherText, nil
}
// AESECBEncrypt is given key to encrypt the plainText in AES ECB way.
AESECBEncrypt is given key to encrypt the plainText in AES ECB way.
// AESECBEncrypt is given key to encrypt the plainText in AES ECB way .
func AESECBEncrypt(key, plainText []byte) ([]byte, error) {
	fmt.Println("AES-ECB Encrpypt: PlainText Length: ", len(plainText))
	if len(plainText)%aes.BlockSize != 0 {
		panic("Need a multiple of the blocksize")
	}
	block, err := aes.NewCipher(key)
	if err != nil {
		return nil, err
	}
	cipherText := make([]byte, len(plainText))
	size := aes.BlockSize
	for bs, be := 0, size; bs < len(plainText); bs, be = bs+size, be+size {
		block.Encrypt(cipherText[bs:be], plainText[bs:be])
	}
	return cipherText, nil
}
func AESECBEncrypt ( key , plainText [ ] byte ) ( [ ] byte , error ) { fmt . Println ( " " , len ( plainText ) ) if len ( plainText ) % aes . BlockSize != 0 { panic ( " " ) } block , err := aes . NewCipher ( key ) if err != nil { return nil , err } cipherText := make ( [ ] byte , len ( plainText ) ) size := aes . BlockSize for bs , be := 0 , size ; bs < len ( plainText ) ; bs , be = bs + size , be + size { block . Encrypt ( cipherText [ bs : be ] , plainText [ bs : be ] ) } return cipherText , nil }
AESECBEncrypt is given key to encrypt the plainText in AES ECB way.
AESECBEncrypt is given key to encrypt the plainText in AES ECB way .