GithubHelp home page GithubHelp logo

yenya / qrcode-base45 Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 25 KB

Perl module for encoding/decoding the Base45 encoding, which is used especially for storing binary data in QR codes, for example in European health care certificates.

Home Page: https://metacpan.org/pod/QRCode::Base45

License: Other

Perl 100.00%
perl qrcode base45

qrcode-base45's Introduction

NAME

QRCode::Base45 - Base45 encoding used in QR codes

SYNOPSIS

use QRCode::Base45;

my $text_for_qrcode = encode_base45($binary_or_utf8_data);
my $binary_data = decode_base45($text_from_qrcode);

DESCRIPTION

This module handles encoding/decoding of Base45 data, as described in draft-faltstrom-base45-06. Base45 is used especially in QR codes, for example in European vaccination certificates.

encode_base45

Takes an arbitrary string as argument, and returns the Base45 representation of it. Character strings (as opposed to byte strings) are encoded to bytes as UTF-8.

For zero-length input strings (undef or '') an empty string ('') is returned.

decode_base45

Takes a textual Base45 representation of data, and tries to decode it. Returned value is a byte string (as this function cannot possibly know whether the content should be interpreted as bytes or UTF-8). The caller has to decode the returned byte string to characters afterwards, if needed.

For zero-length input strings (undef or '') an empty string ('') is returned.

For invalid inputs, such as strings of length 3n+1 or characters outside of the Base45 alphabet, this function croak()s.

AUTHOR

Jan "Yenya" Kasprzak, <kas at yenya.net>

BUGS

Please report any bugs or feature requests to bug-qrcode-base45 at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=QRCode-Base45. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

The Base45 encoding is relatively new. After it is standardized and maybe used elsewhere apart from QR codes, this module should probably be moved to some other namespace, such as IETF:: or RFCxyzq::.

INSTALLATION

To install this module, run the following commands:

    perl Makefile.PL
    make
    make test
    make install

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc QRCode::Base45

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is copyright (c) 2021 by Jan "Yenya" Kasprzak.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

qrcode-base45's People

Contributors

yenya avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

qrcode-base45's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.