public void trackHashAlgorithm(short hashAlgorithm) { if (buf == null) { throw new IllegalStateException("Too late to track more hash algorithms"); } checkTrackingHash(Shorts.valueOf(hashAlgorithm)); }
public void trackHashAlgorithm(short hashAlgorithm) { if (buf == null) { throw new IllegalStateException("Too late to track more hash algorithms"); } checkTrackingHash(Shorts.valueOf(hashAlgorithm)); }
public TlsHandshakeHash notifyPRFDetermined() { int prfAlgorithm = context.getSecurityParameters().getPrfAlgorithm(); if (prfAlgorithm == PRFAlgorithm.tls_prf_legacy) { CombinedHash legacyHash = new CombinedHash(); legacyHash.init(context); buf.updateDigest(legacyHash); return legacyHash.notifyPRFDetermined(); } this.prfHashAlgorithm = Shorts.valueOf(TlsUtils.getHashAlgorithmForPRFAlgorithm(prfAlgorithm)); checkTrackingHash(prfHashAlgorithm); return this; }
public TlsHandshakeHash notifyPRFDetermined() { int prfAlgorithm = context.getSecurityParameters().getPrfAlgorithm(); if (prfAlgorithm == PRFAlgorithm.tls_prf_legacy) { CombinedHash legacyHash = new CombinedHash(); legacyHash.init(context); buf.updateDigest(legacyHash); return legacyHash.notifyPRFDetermined(); } this.prfHashAlgorithm = Shorts.valueOf(TlsUtils.getHashAlgorithmForPRFAlgorithm(prfAlgorithm)); checkTrackingHash(prfHashAlgorithm); return this; }