ToUtf8() 공개 메소드

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

            using (var thisString = new PinnedArray <byte>(this.ToUtf8())) {
                using (var otherString = new PinnedArray <byte>(aSecureEdit.ToUtf8())) {
                    if (thisString.Data.Length != otherString.Data.Length)
                    {
                        return(false);
                    }
                    else
                    {
                        for (int i = 0; i < thisString.Data.Length; ++i)
                        {
                            if (thisString.Data[i] != otherString.Data [i])
                            {
                                return(false);
                            }
                        }
                    }
                    return(true);
                }
            }
        }
예제 #2
0
        public bool ContentsEqualTo(SecureEdit aSecureEdit)
        {
            Debug.Assert(aSecureEdit != null);
              if (aSecureEdit == null) {
            return false;
              }

              using (var thisString = new PinnedArray<byte>(this.ToUtf8())) {
            using (var otherString = new PinnedArray<byte>(aSecureEdit.ToUtf8())) {

              if (thisString.Data.Length != otherString.Data.Length) {
            return false;
              } else {
            for (int i = 0; i < thisString.Data.Length; ++i) {
              if (thisString.Data[i] != otherString.Data [i]) {
                return false;
              }
            }
              }
              return true;
            }
              }
        }
예제 #3
0
 public byte[] GetPassphrase()
 {
     return(mSecureEdit.ToUtf8());
 }