code: func (s *SecureChannelSession) encryptAPDU(data []byte) ([]byte, error) {
  	if len(data) > maxPayloadSize {
  		return nil, fmt.Errorf("Payload of %d bytes exceeds maximum of %d", len(data), maxPayloadSize)
  	}
  	data = pad(data, 0x80)
  
  	ret := make([]byte, len(data))
  
  	a, err := aes.NewCipher(s.sessionEncKey)
  	if err != nil {
  		return nil, err
  	}
  	crypter := cipher.NewCBCEncrypter(a, s.iv)
  	crypter.CryptBlocks(ret, data)
  	return ret, nil
  }
docs: // encryptAPDU is an internal method that serializes and encrypts an APDU.