code: public static byte[] keyGenPrivate(byte[] randomBytes) {
  
          if (randomBytes.length < 32) {
              throw new RuntimeException("Random bytes too small");
          }
  
          // Hashing Random Bytes instead of using random bytes directly
          // Just in case as reference ed255519 implementation do same
          byte[] privateKey = new byte[32];
          Digest sha256 = Crypto.createSHA256();
          sha256.update(randomBytes, 0, randomBytes.length);
          sha256.doFinal(privateKey, 0);
  
          // Performing bit's flipping
          privateKey[0] &= 248;
          privateKey[31] &= 127;
          privateKey[31] |= 64;
  
          return privateKey;
      }
docs: Generating private key. Source: https://cr.yp.to/ecdh.html
  
  @param randomBytes random bytes (32+ bytes)
  @return generated private key