What would it do? AES encryption? PGP?

$encode and $decode are nothing more than a simple cipher known as Uuencode or Mime (base64). There's absolutely no cryptographic magic going on here -- it's kind of like $longip() or $base() in that regard.