-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding describe function #6
Conversation
describe.go
Outdated
fmt.Fprintf(tw, "PAD\t: %s\n", iso.Padding(pin)) | ||
fmt.Fprintf(tw, "Format\t: %s\n", iso.Format()) | ||
fmt.Fprintf(tw, "%s\n", strings.Repeat("-", 36)) | ||
fmt.Fprintf(tw, "Clear PIN block\t: %s\n\n", result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is clear pin block? is it unencrypted value? If so, then for iso4 it will be encrypted.
What's the purpose of the Describe
? Do help to debug calculation? If so, then we should find a way to extract into public methods how we calculate pin field and pan field.
As now, the only data that is not the input or output of the Encode/Decode are:
- Format()
- Padding()
are we really interested in only those two data points?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clear pin block means encrypted block
main purpose is to provide human-readable format of the encoding inputs and outputs.
ISO interface added to support general interface, format and padding functions are utility functions of the interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Cleartext" refers to decrypted data, so "Clear" meaning encrypted is confusing to me.
left a comment here: #2 (comment) |
this logic implemented on format package |
@mfdeveloper508 it looks good! Let's use |
No description provided.