secure-remote-password / srp.net

SRP-6a protocol implementation for .NET Standard 1.6+ and .NET Framework 3.5+
https://www.nuget.org/packages/srp
MIT License
64 stars 10 forks source link

Expected string to be an even number of characters #4

Closed yallie closed 5 years ago

yallie commented 5 years ago

Sometimes the Javascript client reports this error:

RangeError: Expected string to be an even number of characters
    at hexToArrayBuffer (:3000/static/js/1.chunk.js:59422)
    at :3000/static/js/1.chunk.js:168052
    at Array.map (<anonymous>)
    at sha256 (:3000/static/js/1.chunk.js:168050)
    at client.js.exports.deriveSession (:3000/static/js/1.chunk.js:168160)
...

Looks like C# server can return an unpadded integer somewhere.

yallie commented 5 years ago

Fixed in cbd604abb498812e7701133d9f8c29fcd4501652