Closed bseib closed 3 years ago
I have updated this PR to behave the same as the javascript lib does. For the unit test I manually generated some test SVGs and manually confirmed that they visually match what the javascript lib generates. It is a small sample of six SVG files, but has cases for accepting an existing valid hash, or having to generate a new SHA hash.
For example, javascript generated with a valid 11+ character hash value:
https://jdenticon.com/#icon-deadbeef123
Matches our kotlin generated deadbeef123.svg
:
Another example, where the string value must be hashed first
Matches our Alice.svg
:
@jsarabia PR ready for review
Require the
hash
argument to be a hexadecimal string of length 11 or greater.Implement unit tests for the above.
fixes #5