Пример #1
0
        public static bool SetBlob(this APIKeyData apiKeyData, APIKeyBlob blob)
        {
            var newBlob = SerializeBlob(blob);

            if (apiKeyData?.Blob?.SequenceEqual(newBlob) is true)
            {
                return(false);
            }
            apiKeyData.Blob = newBlob;
            return(true);
        }
Пример #2
0
        public static bool SetBlob(this APIKeyData apiKeyData, APIKeyBlob blob)
        {
            var original = new Serializer(null).ToString(apiKeyData.GetBlob());
            var newBlob  = new Serializer(null).ToString(blob);

            if (original == newBlob)
            {
                return(false);
            }
            apiKeyData.Blob = ZipUtils.Zip(newBlob);
            return(true);
        }