-
corentinstd authoredcorentinstd authored
Wallet.java 768 B
package fr.miage;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
public class Wallet {
private String publicKey;
private String privateKey; // pour la signature
private List<UTxO> utxos;
public Wallet(String publicKey, String privateKey) {
this.publicKey = publicKey;
this.privateKey = privateKey;
}
public void initWallet(byte[] data) throws NoSuchAlgorithmException{
}
private String hashSha256(String privateKey) throws NoSuchAlgorithmException{
MessageDigest md = MessageDigest.getInstance("SHA-256");
byte[] hash = md.digest(privateKey.getBytes(StandardCharsets.UTF_8));
}
}