I want to take the public key string from the x509 certificate and generate the hash string sha256 in C(Openssl/x509). But I can\'t get the same hash digest in java code.