Open
Conversation
Ami777
reviewed
Jan 31, 2018
| zamiast: | ||
| 4f7ae6569b55cb6275423ca1cdf31475e607da1d5204c110a58fb480c96e6eca | ||
| */ | ||
| console.log(encodeText(data)); |
Contributor
There was a problem hiding this comment.
Pewnie masz inny system niż ja, a Git zmienia wtedy znaki nowej linii :)
| }); | ||
|
|
||
| function encodeText(text){ | ||
| return crypto.createHmac('sha256', text).digest('hex'); |
Contributor
There was a problem hiding this comment.
Jest ok. Tylko nazwa funkcji encode... może być myląca.
| Takie pytanie: | ||
| Czemu w przypadku innych algorytmów pojawiał się błąd? | ||
| Myślałem, że pojawi się jakiś tekst. Natomiast ponieważ odszyfrowany jest złym algorytmem, to zwróci tekst bez sensu. | ||
| Chodzi o jakieś sumy kontrolne dla różnych algorytmów? |
Contributor
There was a problem hiding this comment.
Różne algorytmy mają różne "wymagania", np. czegoś w stylu sum kontrolnych, czy długości bloków.
| let decrypted = decipher.update(encodedText, 'hex', 'utf8'); | ||
| decrypted += decipher.final('utf8'); | ||
| return decrypted; | ||
| } |
Contributor
There was a problem hiding this comment.
Czy udało się rozkodować :) ?
Author
There was a problem hiding this comment.
tak, dziękuję za odpowiedzi :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.