Пример #1
0
 public void Initialize()
 {
     if (handle == IntPtr.Zero)
     {
         GC.ReRegisterForFinalize(this);
     }
     handle = MHashWrapper.mhash_init(type);
 }
Пример #2
0
        public MHashHelper(MHashId type)
        {
            this.type = type;
            handle    = MHashWrapper.mhash_init(type);
            if (handle == IntPtr.Zero)
            {
                string msg = String.Format("Unknown mhash id '{0}'.", type);
                throw new CryptographicException(msg);
            }

            blocksize = (int)MHashWrapper.mhash_get_block_size(type);
        }