code: public static byte[] getSHA256(byte[] input, boolean asSingleton){
  		if(SHA256_INSTANCE == null){
  			if(asSingleton){
  				try {
  					SHA256_INSTANCE = MessageDigest.getInstance("SHA-256");
  				} catch (NoSuchAlgorithmException e) {
  					e.printStackTrace();
  				}
  			}else{
  				return getHash("SHA-256", input);
  			}		
  		}
  		return SHA256_INSTANCE.digest(input);		
  	}
docs: Get the SHA256 Hash of input
  @param input - the bytes to hash
  @param asSingleton if true use a singleton MessageDigest instance, else create and destroy a MD instance just for this call.
  @return 32 bytes that represent the SHA256 hash of input;