Link Cloaking it will hurt there quality score and thus raising there prices per click

use JavaScript

<script type=”text/javascript”>
<!–
window.location = “http://www.affiliatelink.com/?username”
//–>
</script>

use php

<?php
header(’Location: http://www.affiliatelink.com/?username’);
?>

use html

<meta http-equiv=”refresh” content=”0;url=http://www.affiliate.com/?affilate=username”>
you can use tinyurl and Wordpress Plugins like simple link manager  cloak your links

good luck