| 1 | package Plagger::Crypt::Base64; | ||
| 2 | use strict; | ||
| 3 | use MIME::Base64 (); | ||
| 4 | |||
| 5 | sub id { 'base64' } | ||
| 6 | |||
| 7 | sub decrypt { | ||
| 8 | my($self, $text) = @_; | ||
| 9 | MIME::Base64::decode($text); | ||
| 10 | } | ||
| 11 | |||
| 12 | sub encrypt { | ||
| 13 | my($self, $text) = @_; | ||
| 14 | MIME::Base64::encode($text, ''); | ||
| 15 | } | ||
| 16 | |||
| 17 | 1; | ||
| 18 |