Lines 101-107
sub qr_code {
Link Here
|
101 |
|
101 |
|
102 |
my $otpauth = $self->SUPER::qr_code( undef, undef, undef, 1); |
102 |
my $otpauth = $self->SUPER::qr_code( undef, undef, undef, 1); |
103 |
# no need to pass secret, key and issuer again |
103 |
# no need to pass secret, key and issuer again |
104 |
my $qrcode = GD::Barcode->new( 'QRcode', $otpauth, { Ecc => 'M', Version => 10, ModuleSize => 4 } ); |
104 |
my $qrcode = GD::Barcode->new( 'QRcode', $otpauth, { Ecc => 'M', ModuleSize => 4 } ); |
105 |
my $data = $qrcode->plot->png; |
105 |
my $data = $qrcode->plot->png; |
106 |
return "data:image/png;base64,". encode_base64( $data, q{} ); # does not contain newlines |
106 |
return "data:image/png;base64,". encode_base64( $data, q{} ); # does not contain newlines |
107 |
} |
107 |
} |
108 |
- |
|
|