We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm testing to write simple "hello word", for test my crypto suites. i start from simple hash.
Some static method non are present on bytecoder. Example MessageDigest.getInstance().
Than i try use BouncyCastle, compile now work but result is not equal at java output:
public class SimpleMain { public static void main(String[] args) throws NoSuchAlgorithmException { SHA1Digest digest = new SHA1Digest(); byte[] digestValue = new byte[digest.getDigestSize()]; byte[] dataTODigest = new byte[4]; dataTODigest[0]='c'; dataTODigest[1]='i'; dataTODigest[2]='a'; dataTODigest[3]='o'; String b64Value = new String(Base64.getEncoder().encode(dataTODigest)); System.out.println("b64Value :"+b64Value); digest.update(dataTODigest,0,dataTODigest.length); System.out.println("Hash before compute:"+new String(Base64.getEncoder().encode(digestValue),StandardCharsets.UTF_8)); digest.doFinal(digestValue,0); String b64Hash = new String(Base64.getEncoder().encode(digestValue), StandardCharsets.UTF_8); System.out.println("Hash :"+b64Hash); } }
this is java output:
b64Value :Y2lhbw== Hash before compute:AAAAAAAAAAAAAAAAAAAAAAAAAAA= Hash :Hk6IisZvjdQeAMWnrDajKplQ0nE=
this is wasm end javascript output:
b64Value :Y2lhbw== bytecoder.js:88 Hash before compute:AAAAAAAAAAAAAAAAAAAAAAAAAAA= bytecoder.js:88 Hash :K6r70mv+s+MMMKxOx5stObZrVb8=
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I'm testing to write simple "hello word", for test my crypto suites.
i start from simple hash.
Some static method non are present on bytecoder.
Example MessageDigest.getInstance().
Than i try use BouncyCastle, compile now work but result is not equal at java output:
this is java output:
this is wasm end javascript output:
The text was updated successfully, but these errors were encountered: