The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES and JSON Web Signature/Token in pure JavaScript.
zulutosec cannot convert some future times(e.g. '401231235959Z') correctly.
zulutosec uses ~ for cutting off after the decimal point.
Bitwise not (~ ) converts integer with more than 32 bits into a 32-bit signed integer.
So, '401231235959Z'(Unix time is 2240611199000, more than 32 bits) will be shotened by bitwise not operator and be coverted incorrectly.
zulutosec cannot convert some future times(e.g. '401231235959Z') correctly.
zulutosec uses
~
for cutting off after the decimal point. Bitwise not (~
) converts integer with more than 32 bits into a 32-bit signed integer. So, '401231235959Z'(Unix time is2240611199000
, more than 32 bits) will be shotened by bitwise not operator and be coverted incorrectly.Bitwise NOT (~) - JavaScript | MDN
Sample code is following.
Thanks.