public StretchedHash(ByteSequence h, ByteSequence s, int i) { hash = h; salt = s; iterations = i; }
static public StretchedHash ReadStretchedHash(this BinaryReader item) { ByteSequence hash = item.ReadByteSequence(); ByteSequence salt = item.ReadByteSequence(); int iterations = item.ReadInt32(); return(new StretchedHash(hash, salt, iterations)); }
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) ); }
public StretchedHash(byte[] b, int hs, int ss, int i) : this(b, hs, ByteSequence.GenerateCryptographic(ss), i) { }
static public void Write(this BinaryWriter item, ByteSequence value) { item.Write(value.GetSize()); item.Write(value.GetBytes()); }
static public string ToHexString(this ByteSequence item) { return(item.GetBytes().ToHexString()); }
static public string ToBinaryRepresentationString(this ByteSequence item, BinaryRepresentationType type) { return(item.GetBytes().ToBinaryRepresentationString(type)); }