Closed ertong closed 3 years ago
print(base64.encode(ASN1BitString(stringValues: [1]).encode())); returns AwEB (030101) expected AwIAAQ== (03020001) (verified by other implementations)
print(base64.encode(ASN1BitString(stringValues: [1]).encode()));
It looks like there should be added extra byte "padding" for some reason.
I suppose, that it should be enough to add default value for unusedbits field to zero in ASN1BitString.
pointycastle: 2.0.0
I think it seems the unused bit was missing. Maybe this is fixed by #57. I will take a look at it next week.
Fixed by: https://github.com/bcgit/pc-dart/pull/57
print(base64.encode(ASN1BitString(stringValues: [1]).encode()));
returns AwEB (030101) expected AwIAAQ== (03020001) (verified by other implementations)It looks like there should be added extra byte "padding" for some reason.
I suppose, that it should be enough to add default value for unusedbits field to zero in ASN1BitString.
pointycastle: 2.0.0