public static Sha1Wire Convert(this Sha1 model) { var wire = new Sha1Wire { Blit0 = model.Blit0, Blit1 = model.Blit1, Blit2 = model.Blit2 }; return(wire); }
public static Sha1Wire Convert(this Sha1 model) { Sha1Wire wire; var array = ArrayPool <byte> .Shared.Rent(Sha1.ByteLen); { model.CopyTo(array); wire = new Sha1Wire { Set = true, Data = Google.Protobuf.ByteString.CopyFrom(array, 0, Sha1.ByteLen) }; } ArrayPool <byte> .Shared.Return(array); return(wire); }
public static Sha1 Convert(this Sha1Wire wire) { if (wire == null) { return(default);
public static Sha1?Convert(this Sha1Wire wire) { if (wire == null || !wire.Set) { return(default);