public static Metro128Context BeginProcessInline(uint seed = 0) { var context = new Metro128Context { Seed = seed }; context.Current.V0 = (seed - Metro128Constants.K0) * Metro128Constants.K3; context.Current.V1 = (seed + Metro128Constants.K1) * Metro128Constants.K2; context.Current.V2 = (seed + Metro128Constants.K0) * Metro128Constants.K2; context.Current.V3 = (seed - Metro128Constants.K1) * Metro128Constants.K3; return(context); }
public static Metro128Context ProcessInline(Metro128Context context, byte *buffer, int length) { if (context.LeftoverCount != 0) throw new NotSupportedException("Streaming process does not support resuming with buffers whose size is not 32 bytes aligned. Supporting it would impact performance."); }