Skip to content

✨ Add blake3 support #580

@XChikuX

Description

@XChikuX

What feature or enhancement are you suggesting?

Blake3 is THE modern hashing algorithm out there.

There are plenty of opensource contributions toward blake3.

One such example is: https://github.com/connor4312/blake3

Could we please port it to work with react-native as well. I sorely miss this feature as it would be a great security add one. Especially for tagging images on users' phones directly.

I also use it to make secure HMACs:

async function makeHmac(msg: string, derivedKey: string): Promise<string> {
  const hashFunc = createBLAKE3(256);
  const hmac = await createHMAC(hashFunc, derivedKey);

  hmac.init();
  hmac.update(msg);
  const hmacResult = hmac.digest();

  const token = `Bearer ${hmacResult};${msg}`;
  return token;
}

Thanks!

What Platforms whould this feature/enhancement affect?

iOS, Android

Alternatives/Workarounds

There are no current workarounds except, very messily trying to connect a wasm implementation over react-native-react-bridge.

However, this approach is something I could not even get a basic example working.

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions