Skip to content
New issue

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

Java reviewideas addblockchain #8

Merged
merged 12 commits into from
Oct 14, 2021
Merged

Conversation

gabywald
Copy link
Owner

No description provided.

@gabywald gabywald added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Oct 14, 2021
@gabywald gabywald self-assigned this Oct 14, 2021
@todo
Copy link

todo bot commented Oct 14, 2021

replace GsonBuilder !! (build json from objet !)

// TODO replace GsonBuilder !! (build json from objet !)
import com.google.gson.GsonBuilder;
/**
* NoobChain Test and Main Class of BlockChain.
* <br/><a href="https://medium.com/programmers-blockchain/create-simple-blockchain-java-tutorial-from-scratch-6eeed3cb03fa">https://medium.com/programmers-blockchain/create-simple-blockchain-java-tutorial-from-scratch-6eeed3cb03fa</a>


This comment was generated by todo based on a TODO comment in f210ffc in #8. cc @gabywald.

@todo
Copy link

todo bot commented Oct 14, 2021

upgrade / improve this method (applySha256) to return null value if any exception inside !

* TODO upgrade / improve this method (applySha256) to return null value if any exception inside !
*/
public static String applySha256(String input)
throws BlockchainException {
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");


This comment was generated by todo based on a TODO comment in f210ffc in #8. cc @gabywald.

@todo
Copy link

todo bot commented Oct 14, 2021

learning how security works here !

// TODO learning how security works here !
/**
* Applies ECDSA Signature and returns the result ( as bytes ).
* @param privateKey
* @param input


This comment was generated by todo based on a TODO comment in f210ffc in #8. cc @gabywald.

@todo
Copy link

todo bot commented Oct 14, 2021

check alternatives for here when exception occurs !! (builder ?) : see StringUtils.applySha256 comment !

// TODO check alternatives for here when exception occurs !! (builder ?) : see StringUtils.applySha256 comment !
} catch (BlockchainException e) {
// e.printStackTrace();
System.out.println(e.getMessage());
this.id = null;
}


This comment was generated by todo based on a TODO comment in f210ffc in #8. cc @gabywald.

@gabywald gabywald linked an issue Oct 14, 2021 that may be closed by this pull request
@todo
Copy link

todo bot commented Oct 14, 2021

learning how security works here !

// TODO learning how security works here !
KeyPairGenerator keyGen = KeyPairGenerator.getInstance(StringUtils.ECDSA, StringUtils.BC);
// KeyPairGenerator keyGen = KeyPairGenerator.getInstance(StringUtils.CipherAlgorithm, StringUtils.CipherProvider);
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
ECGenParameterSpec ecSpec = new ECGenParameterSpec("prime192v1");
// Initialize the key generator and generate a KeyPair : 256 bytes provides an acceptable security level


This comment was generated by todo based on a TODO comment in f210ffc in #8. cc @gabywald.

@gabywald gabywald merged commit b74c736 into master Oct 14, 2021
@gabywald gabywald deleted the java-reviewideas-addblockchain branch October 14, 2021 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add BlockChain Example (from tutorial)
1 participant