seaburg / igidenticon Goto Github PK
View Code? Open in Web Editor NEWSwift identicon generator
License: MIT License
Swift identicon generator
License: MIT License
This looks like a pretty neat library, and I'm happy to see it has both iOS and Mac support in the source code.
Unfortunately the default scheme (I think?) only builds for iOS, so a Mac application that loads it with Carthage doesn't build a Mac framework.
This is probably easy to fix, and I'll take a look if I have time, but Xcode projects are not exactly my forte.
Hello, I'm trying to implement this library in Swift 3.0.
When setting up the generator, I come across the following problem:
let imageGenerator = IGImageGenerator(imageProducer: IGGitHubIdenticon(), hashFunction: IGJenkinsHashFromData(data: Data!))
I'm not sure how to implement the IGJenkinsHashFromData method into swift, can you please assist?
Below is the Objective-C implementation.
#import "IGHashFunctions.h"
uint32_t IGJenkinsHashFromData(NSData *data)
{
uint32_t hash = 0;
const unsigned char *bytes = data.bytes;
for(NSUInteger i = 0; i < [data length]; ++i) {
hash += bytes[i];
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
return hash;
}
Right now it looks like it is hardcoded to use MD4. Is this for compatibility with another library? I'd prefer to use SHA-256 if possible.
It's great to use this library getting the identicon by client.
however, can i custom the avatar style.
I want get the github style.
XCode 12 warning on build:
... SourcePackages/checkouts/IGIdenticon/Package.swift The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99.
Consider bumping the minimum deployment target to 9.0 to address the warning? (Package.swift)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.