상속: GeneralDigest
예제 #1
0
		private void CopyIn(Sha1Digest t)
		{
			base.CopyIn(t);

			H1 = t.H1;
			H2 = t.H2;
			H3 = t.H3;
			H4 = t.H4;
			H5 = t.H5;

			Array.Copy(t.X, 0, X, 0, t.X.Length);
			xOff = t.xOff;
		}
예제 #2
0
        private void CopyIn(Sha1Digest t)
        {
            base.CopyIn(t);

            H1 = t.H1;
            H2 = t.H2;
            H3 = t.H3;
            H4 = t.H4;
            H5 = t.H5;

            Array.Copy(t.X, 0, X, 0, t.X.Length);
            xOff = t.xOff;
        }
예제 #3
0
        private void CopyIn(Sha1Digest t)
        {
            base.CopyIn(t);

            this.H1 = t.H1;
            this.H2 = t.H2;
            this.H3 = t.H3;
            this.H4 = t.H4;
            this.H5 = t.H5;

            Array.Copy(t.X, 0, this.X, 0, t.X.Length);
            this.xOff = t.xOff;
        }
예제 #4
0
파일: Hashes.cs 프로젝트: crowar/NBitcoin
		public static byte[] SHA1(byte[] data, int offset, int count)
		{
			var sha1 = new Sha1Digest();
			sha1.BlockUpdate(data, offset, count);
			byte[] rv = new byte[20];
			sha1.DoFinal(rv, 0);
			return rv;
		}
예제 #5
0
 /**
  * Copy constructor.  This will copy the state of the provided
  * message digest.
  */
 public Sha1Digest(Sha1Digest t)
     : base(t)
 {
     CopyIn(t);
 }
예제 #6
0
        public override void Reset(IMemoable other)
        {
            Sha1Digest d = (Sha1Digest)other;

            CopyIn(d);
        }
예제 #7
0
		/**
         * Copy constructor.  This will copy the state of the provided
         * message digest.
         */
		public Sha1Digest(Sha1Digest t)
			: base(t)
		{
			CopyIn(t);
		}
예제 #8
0
		private static byte[] GetDigest(
			SubjectPublicKeyInfo spki)
		{
            IDigest digest = new Sha1Digest();
            byte[] resBuf = new byte[digest.GetDigestSize()];

			byte[] bytes = spki.PublicKeyData.GetBytes();
            digest.BlockUpdate(bytes, 0, bytes.Length);
            digest.DoFinal(resBuf, 0);
            return resBuf;
		}