public StretchedHash(byte[] b, int hs, ByteSequence s, int i) { salt = s; iterations = i; hash = new ByteSequence( new Rfc2898DeriveBytes(b, salt.GetBytes(), iterations).GetBytes(hs) ); }
static public string ToHexString(this ByteSequence item) { return(item.GetBytes().ToHexString()); }
static public void Write(this BinaryWriter item, ByteSequence value) { item.Write(value.GetSize()); item.Write(value.GetBytes()); }
static public string ToBinaryRepresentationString(this ByteSequence item, BinaryRepresentationType type) { return(item.GetBytes().ToBinaryRepresentationString(type)); }