Skip to content

Генерация контрольных номеров #328

@myltik1702

Description

@myltik1702

def luhn_generate(base_digits, length=16):
base = list(map(int, str(base_digits)))
while len(base) < length - 1:
base.append(0) # дополнение нулями
checksum = luhn_checksum(base)
return ''.join(map(str, base)) + str(checksum)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions