GetHashAlgorithmForPrfAlgorithm() 공개 정적인 메소드

public static GetHashAlgorithmForPrfAlgorithm ( int prfAlgorithm ) : byte
prfAlgorithm int
리턴 byte
예제 #1
0
        public virtual TlsHandshakeHash NotifyPrfDetermined()
        {
            int prfAlgorithm = mContext.SecurityParameters.PrfAlgorithm;

            if (prfAlgorithm == 0)
            {
                CombinedHash combinedHash = new CombinedHash();
                combinedHash.Init(mContext);
                mBuf.UpdateDigest(combinedHash);
                return(combinedHash.NotifyPrfDetermined());
            }
            mPrfHashAlgorithm = TlsUtilities.GetHashAlgorithmForPrfAlgorithm(prfAlgorithm);
            CheckTrackingHash((byte)mPrfHashAlgorithm);
            return(this);
        }
예제 #2
0
        public virtual TlsHandshakeHash NotifyPrfDetermined()
        {
            int prfAlgorithm = this.mContext.SecurityParameters.PrfAlgorithm;

            if (prfAlgorithm == 0)
            {
                CombinedHash d = new CombinedHash();
                d.Init(this.mContext);
                this.mBuf.UpdateDigest(d);
                return(d.NotifyPrfDetermined());
            }
            this.mPrfHashAlgorithm = TlsUtilities.GetHashAlgorithmForPrfAlgorithm(prfAlgorithm);
            this.CheckTrackingHash((byte)this.mPrfHashAlgorithm);
            return(this);
        }