CreateRawCompositeKey32() private method

Creates the composite key from the supplied user key sources (password, key file, user account, computer ID, etc.).
private CreateRawCompositeKey32 ( ) : byte[]
return byte[]
コード例 #1
0
        public bool EqualsValue(CompositeKey ckOther)
        {
            if (ckOther == null)
            {
                throw new ArgumentNullException("ckOther");
            }

            byte[] pbThis  = CreateRawCompositeKey32();
            byte[] pbOther = ckOther.CreateRawCompositeKey32();
            bool   bResult = MemUtil.ArraysEqual(pbThis, pbOther);

            MemUtil.ZeroByteArray(pbOther);
            MemUtil.ZeroByteArray(pbThis);

            return(bResult);
        }
コード例 #2
0
        public bool EqualsValue(CompositeKey ckOther)
        {
            if (ckOther == null)
            {
                throw new ArgumentNullException("ckOther");
            }

            bool bEqual;

            byte[] pbThis = CreateRawCompositeKey32();
            try
            {
                byte[] pbOther = ckOther.CreateRawCompositeKey32();
                bEqual = MemUtil.ArraysEqual(pbThis, pbOther);
                MemUtil.ZeroByteArray(pbOther);
            }
            finally { MemUtil.ZeroByteArray(pbThis); }

            return(bEqual);
        }
コード例 #3
0
ファイル: CompositeKey.cs プロジェクト: rassilon/keepass
        public bool EqualsValue(CompositeKey ckOther)
        {
            if(ckOther == null) throw new ArgumentNullException("ckOther");

            byte[] pbThis = CreateRawCompositeKey32();
            byte[] pbOther = ckOther.CreateRawCompositeKey32();
            bool bResult = MemUtil.ArraysEqual(pbThis, pbOther);
            Array.Clear(pbOther, 0, pbOther.Length);
            Array.Clear(pbThis, 0, pbThis.Length);

            return bResult;
        }