1
0
Fork 0
forked from forgejo/forgejo

Update github.com/pquerna/otp from untagged to v1.2.0 (#11358)

This commit is contained in:
6543 2020-05-10 14:50:16 +02:00 committed by GitHub
parent 57b6f83191
commit 43bb85908d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 192 additions and 54 deletions

View file

@ -20,7 +20,7 @@ func (qr *qrcode) Content() string {
}
func (qr *qrcode) Metadata() barcode.Metadata {
return barcode.Metadata{"QR Code", 2}
return barcode.Metadata{barcode.TypeQR, 2}
}
func (qr *qrcode) ColorModel() color.Model {
@ -46,10 +46,6 @@ func (qr *qrcode) Set(x, y int, val bool) {
qr.data.SetBit(x*qr.dimension+y, val)
}
func (qr *qrcode) CheckSum() int {
return 0
}
func (qr *qrcode) calcPenalty() uint {
return qr.calcPenaltyRule1() + qr.calcPenaltyRule2() + qr.calcPenaltyRule3() + qr.calcPenaltyRule4()
}