Beispiel #1
0
        /// <summary>
        /// Generate a 10 printable characters Suid
        /// </summary>
        /// <returns>string representation</returns>
        public static string NewSuid()
        {
            var bytes = GetUnique();

            return(Ascii85.Encode(bytes));
        }
Beispiel #2
0
        /// <summary>
        /// Convert a Guid into it's truly unique Suid representation
        /// </summary>
        /// <param name="g"></param>
        /// <returns></returns>
        public static string ToSuid(this Guid g)
        {
            var guid = g.ToByteArray();

            return(Ascii85.Encode(guid));
        }