Code example for Signature

Methods: sign, update

0
	} 
	 
 
	@Override 
	public byte[] signer(byte[] donnee) throws SignatureException {
		DSA.update(donnee);
		return DSA.sign();
	} 
 
 
	@Override 
	public boolean estValide(byte[] donnees, byte[] signature) throws SignatureException {
		DSA.update(donnees);
		return DSA.verify(signature);
	} 
 
 
	public void setClePrivee(PrivateKey cle) throws InvalidKeyException{
		clePrivee = cle;
		DSA.initSign(clePrivee);