Socket
Book a DemoInstallSign in
Socket

react-identicon-variety-pack

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-identicon-variety-pack

**React Identicon Variety Pack!** is a react component that displays one of a selection of different identicons. It's useful for turning hard to read computer data (like a cryptographic key) into a form that's easily recognizable for humans. [Here's an ov

0.2.1
latest
Source
npmnpm
Version published
Weekly downloads
295
-14.99%
Maintainers
1
Weekly downloads
 
Created
Source

React Identicon Variety Pack! is a react component that displays one of a selection of different identicons. It's useful for turning hard to read computer data (like a cryptographic key) into a form that's easily recognizable for humans. Here's an overview of the subject.

Live demo

Here's a live demo for you to play with.

Installation

yarn add react-identicon-variety-pack

Usage

import { Network as Identicon } from 'react-identicon-variety-pack'

<Identicon
  size={64}
  seed={'yourpublickeyorhash'}
/>

Available styles

These are the component names, so you can eg import { Blockies } from 'react-identicon-variety-pack'.

Network

Network style identicons

Bishop

Based on the algorithm used for ssh visual keys. Bishop style identicons

Rings

Rings style identicons

Blockies

Based on this library. Blockies style identicons

Network Large

Network Large style identicons

Discs

Discs style identicons

Props

seed

random seed that generates the image.

size

size in pixels

gridSize

number of rows and columns in grid (only relevant for Blockies and Bishop).

scale

size of each gird cell in pixes (only relevant for Blockies and Bishop).

A note about security

With the (qualified) exception of Bishop*, these algorithms have not been studied for how well behaved they are as hashing functions, with regard to the three properties of preimage resistance, 2nd-preimage resistance and collision resistance. This means I can make no gaurantees about how easy it would be to spoof one of these by finding a seed that generates an image sufficiently close to a desired image. My guess is it would be very hard with any of them, but that's not backed by research. So if you are using these as part of a security protocol, you will have to satisfy yourself that they meet your requirements.

* "Qualified" because while Bishop has been studied, it was the ascii art version that was studied. The version presented here is a pixel art version and has very different visual properties.

More discussion here.

FAQs

Package last updated on 30 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.