| 1 | package Convert::Base64; | ||
| 2 | 1 | $Convert::Base64::VERSION = '0.001'; | |
| 3 | # ABSTRACT: Encoding and decoding of Base64 strings | ||
| 4 | |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | ▶ | use MIME::Base64 (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 1 | require Exporter; | |
| 10 | 1 | our @ISA = qw(Exporter); | |
| 11 | 1 | our @EXPORT = qw(encode_base64 decode_base64); | |
| 12 | |||
| 13 | 0 | ▶ | sub encode_base64 { @_ = ($_[0], ''); goto &MIME::Base64::encode; } |
|
Subroutine
encode_base64: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 14 | 1 | *decode_base64 = \&MIME::Base64::decode; | |
| 15 | |||
| 16 | 1 | 1; | |
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | Convert::Base64 - Encoding and decoding of Base64 strings | ||
| 21 | |||
| 22 | =head1 VERSION | ||
| 23 | |||
| 24 | version 0.001 | ||
| 25 | |||
| 26 | =head1 SYNOPSIS | ||
| 27 | |||
| 28 | use Convert::Base64; | ||
| 29 | |||
| 30 | $encoded = encode_base64("\x3a\x27\x0f\x93"); | ||
| 31 | $decoded = decode_base64($encoded); | ||
| 32 | |||
| 33 | |||
| 34 | =head1 DESCRIPTION | ||
| 35 | |||
| 36 | This module provides functions to convert strings to/from the Base64 encoding | ||
| 37 | as described in RFC 4648. | ||
| 38 | |||
| 39 | Its implemented as a light wrapper over L<MIME::Base64>. | ||
| 40 | |||
| 41 | =head1 FUNCTIONS | ||
| 42 | |||
| 43 | =over 4 | ||
| 44 | |||
| 45 | =item * | ||
| 46 | |||
| 47 | C<encode_base64> | ||
| 48 | |||
| 49 | my $encoded = encode_base64("foo"); | ||
| 50 | |||
| 51 | Encode a string of bytes into its Base64 representation. | ||
| 52 | |||
| 53 | =item * | ||
| 54 | |||
| 55 | C<decode_base64> | ||
| 56 | |||
| 57 | my $decoded = encode_base64("Zm9v"); | ||
| 58 | |||
| 59 | Decode a Base64 string into a string of bytes. | ||
| 60 | |||
| 61 | =back | ||
| 62 | |||
| 63 | =head1 SEE ALSO | ||
| 64 | |||
| 65 | =over 4 | ||
| 66 | |||
| 67 | =item * | ||
| 68 | |||
| 69 | L<MIME::Base64> - the classic Base64 implementation for Perl, used internally | ||
| 70 | by this module | ||
| 71 | |||
| 72 | =item * | ||
| 73 | |||
| 74 | L<Convert::Base32> - the original inspiration for this module | ||
| 75 | |||
| 76 | =item * | ||
| 77 | |||
| 78 | L<http://tools.ietf.org/html/rfc4648> - the Base64 specification | ||
| 79 | |||
| 80 | =back | ||
| 81 | |||
| 82 | =head1 SUPPORT | ||
| 83 | |||
| 84 | =head2 Bugs / Feature Requests | ||
| 85 | |||
| 86 | Please report bugs or feature requests through the issue tracker at | ||
| 87 | L<https://github.com/robn/Convert-Base64/issues>. You will be notified | ||
| 88 | automatically of any progress on your issue. | ||
| 89 | |||
| 90 | =head2 Source Code | ||
| 91 | |||
| 92 | This is open source software. The code repository is available for | ||
| 93 | public review and contribution under the terms of the license. | ||
| 94 | |||
| 95 | L<https://github.com/robn/Convert-Base64> | ||
| 96 | |||
| 97 | git clone https://github.com/robn/Convert-Base64.git | ||
| 98 | |||
| 99 | =head1 AUTHORS | ||
| 100 | |||
| 101 | =over 4 | ||
| 102 | |||
| 103 | =item * | ||
| 104 | |||
| 105 | Robert Norris <rob@eatenbyagrue.org> | ||
| 106 | |||
| 107 | =back | ||
| 108 | |||
| 109 | =head1 COPYRIGHT AND LICENSE | ||
| 110 | |||
| 111 | This software is copyright (c) 2014 by Robert Norris. | ||
| 112 | |||
| 113 | This is free software; you can redistribute it and/or modify it under | ||
| 114 | the same terms as the Perl 5 programming language system itself. | ||
| 115 | |||
| 116 | =cut | ||