ToUtf8() 공개 메소드

public ToUtf8 ( ) : byte[]
리턴 byte[]
예제 #1
0
        public bool ContentsEqualTo(SecureEdit secOther)
        {
            Debug.Assert(secOther != null); if (secOther == null)
            {
                return(false);
            }

            byte[] pbThis  = this.ToUtf8();
            byte[] pbOther = secOther.ToUtf8();

            bool bEqual = true;

            if (pbThis.Length != pbOther.Length)
            {
                bEqual = false;
            }
            else
            {
                for (int i = 0; i < pbThis.Length; ++i)
                {
                    if (pbThis[i] != pbOther[i])
                    {
                        bEqual = false;
                        break;
                    }
                }
            }

            Array.Clear(pbThis, 0, pbThis.Length);
            Array.Clear(pbOther, 0, pbOther.Length);
            return(bEqual);
        }
예제 #2
0
        public bool ContentsEqualTo(SecureEdit secOther)
        {
            Debug.Assert(secOther != null); if (secOther == null) return false;

              byte[] pbThis = this.ToUtf8();
              byte[] pbOther = secOther.ToUtf8();

              bool bEqual = true;

              if (pbThis.Length != pbOther.Length) bEqual = false;
              else {
            for (int i = 0; i < pbThis.Length; ++i) {
              if (pbThis[i] != pbOther[i]) {
            bEqual = false;
            break;
              }
            }
              }

              Array.Clear(pbThis, 0, pbThis.Length);
              Array.Clear(pbOther, 0, pbOther.Length);
              return bEqual;
        }