You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey when i use the following code in Version 5 i get the message below.
With Version 4.1 it works just fine.
When i remove the JweCompression.DEF from Encryption it also works with 5 but the JWE Tokens i get are all compressed.
using RSA rsa = RSA.Create(4096);
var privateKey = rsa.ExportParameters(true);
var publicKey = rsa.ExportParameters(false);
var payload = Convert.ToBase64String(File.ReadAllBytes(@"C:\pathtofile\file-example_PDF_500_kB.pdf"));
using RSA rsaPublicKey = RSA.Create(publicKey);
var encryptedToken = JWT.Encode(payload, rsaPublicKey, JweAlgorithm.RSA_OAEP, JweEncryption.A256GCM, JweCompression.DEF);
using RSA rsaPrivateKey = RSA.Create(privateKey);
var decryptedToken = JWT.Decode(encryptedToken, rsaPrivateKey, JweAlgorithm.RSA_OAEP, JweEncryption.A256GCM);
Assert.That(decryptedToken, Is.EqualTo(payload));
Message:
Jose.JoseException : Unable to deflate compressed payload, most likely exceeded decompression buffer size.
----> System.NotSupportedException : Memory stream is not expandable.
Hey when i use the following code in Version 5 i get the message below.
With Version 4.1 it works just fine.
When i remove the
JweCompression.DEF
from Encryption it also works with 5 but the JWE Tokens i get are all compressed.Message:
Jose.JoseException : Unable to deflate compressed payload, most likely exceeded decompression buffer size.
----> System.NotSupportedException : Memory stream is not expandable.
file-example_PDF_500_kB.pdf
The text was updated successfully, but these errors were encountered: