@symbiote-native/crypto 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -41
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -59,7 +59,6 @@ stays a physical file/subpath since Angular ships through a separate `ngc`/AOT b
|
|
|
59
59
|
```tsx
|
|
60
60
|
// React
|
|
61
61
|
import { useEffect, useState } from 'react';
|
|
62
|
-
import { Pressable, Text, View } from '@symbiote-native/react';
|
|
63
62
|
import {
|
|
64
63
|
CryptoDigestAlgorithm,
|
|
65
64
|
digestStringAsync,
|
|
@@ -81,13 +80,13 @@ function CryptoScreen() {
|
|
|
81
80
|
};
|
|
82
81
|
|
|
83
82
|
return (
|
|
84
|
-
<
|
|
85
|
-
<
|
|
86
|
-
<
|
|
87
|
-
<
|
|
88
|
-
</
|
|
89
|
-
{hash && <
|
|
90
|
-
</
|
|
83
|
+
<view>
|
|
84
|
+
<text>UUID: {uuid}</text>
|
|
85
|
+
<pressable onPress={handleHash}>
|
|
86
|
+
<text>Hash a string</text>
|
|
87
|
+
</pressable>
|
|
88
|
+
{hash && <text>SHA-256: {hash}</text>}
|
|
89
|
+
</view>
|
|
91
90
|
);
|
|
92
91
|
}
|
|
93
92
|
```
|
|
@@ -96,7 +95,6 @@ function CryptoScreen() {
|
|
|
96
95
|
<!-- Vue -->
|
|
97
96
|
<script setup lang="ts">
|
|
98
97
|
import { onMounted, ref } from 'vue';
|
|
99
|
-
import { Pressable, Text, View } from '@symbiote-native/vue';
|
|
100
98
|
import {
|
|
101
99
|
CryptoDigestAlgorithm,
|
|
102
100
|
digestStringAsync,
|
|
@@ -121,20 +119,19 @@ function handleHash(): void {
|
|
|
121
119
|
</script>
|
|
122
120
|
|
|
123
121
|
<template>
|
|
124
|
-
<
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
<
|
|
128
|
-
</
|
|
129
|
-
<
|
|
130
|
-
</
|
|
122
|
+
<view>
|
|
123
|
+
<text>UUID: {{ uuid }}</text>
|
|
124
|
+
<pressable @press="handleHash">
|
|
125
|
+
<text>Hash a string</text>
|
|
126
|
+
</pressable>
|
|
127
|
+
<text v-if="hash">SHA-256: {{ hash }}</text>
|
|
128
|
+
</view>
|
|
131
129
|
</template>
|
|
132
130
|
```
|
|
133
131
|
|
|
134
132
|
```svelte
|
|
135
133
|
<!-- Svelte -->
|
|
136
134
|
<script lang="ts">
|
|
137
|
-
import { Pressable, Text, View } from '@symbiote-native/svelte';
|
|
138
135
|
import {
|
|
139
136
|
CryptoDigestAlgorithm,
|
|
140
137
|
digestStringAsync,
|
|
@@ -151,19 +148,18 @@ function handleHash(): void {
|
|
|
151
148
|
}
|
|
152
149
|
</script>
|
|
153
150
|
|
|
154
|
-
<
|
|
155
|
-
<
|
|
156
|
-
<
|
|
157
|
-
<
|
|
158
|
-
</
|
|
159
|
-
{#if hash}<
|
|
160
|
-
</
|
|
151
|
+
<view>
|
|
152
|
+
<text>UUID: {uuid}</text>
|
|
153
|
+
<pressable onPress={handleHash}>
|
|
154
|
+
<text>Hash a string</text>
|
|
155
|
+
</pressable>
|
|
156
|
+
{#if hash}<text>SHA-256: {hash}</text>{/if}
|
|
157
|
+
</view>
|
|
161
158
|
```
|
|
162
159
|
|
|
163
160
|
```tsx
|
|
164
161
|
// Solid
|
|
165
162
|
import { createSignal } from 'solid-js';
|
|
166
|
-
import { Pressable, Text, View } from '@symbiote-native/solid';
|
|
167
163
|
import {
|
|
168
164
|
CryptoDigestAlgorithm,
|
|
169
165
|
digestStringAsync,
|
|
@@ -181,13 +177,13 @@ function CryptoScreen() {
|
|
|
181
177
|
};
|
|
182
178
|
|
|
183
179
|
return (
|
|
184
|
-
<
|
|
185
|
-
<
|
|
186
|
-
<
|
|
187
|
-
<
|
|
188
|
-
</
|
|
189
|
-
{hash() && <
|
|
190
|
-
</
|
|
180
|
+
<view>
|
|
181
|
+
<text>UUID: {uuid()}</text>
|
|
182
|
+
<pressable onPress={handleHash}>
|
|
183
|
+
<text>Hash a string</text>
|
|
184
|
+
</pressable>
|
|
185
|
+
{hash() && <text>SHA-256: {hash()}</text>}
|
|
186
|
+
</view>
|
|
191
187
|
);
|
|
192
188
|
}
|
|
193
189
|
```
|
|
@@ -195,7 +191,7 @@ function CryptoScreen() {
|
|
|
195
191
|
```ts
|
|
196
192
|
// Angular
|
|
197
193
|
import { Component, signal } from '@angular/core';
|
|
198
|
-
import {
|
|
194
|
+
import { SYMBIOTE_ELEMENTS } from '@symbiote-native/angular';
|
|
199
195
|
import {
|
|
200
196
|
CryptoDigestAlgorithm,
|
|
201
197
|
digestStringAsync,
|
|
@@ -204,17 +200,17 @@ import {
|
|
|
204
200
|
|
|
205
201
|
@Component({
|
|
206
202
|
standalone: true,
|
|
207
|
-
imports: [
|
|
203
|
+
imports: [SYMBIOTE_ELEMENTS],
|
|
208
204
|
template: `
|
|
209
|
-
<
|
|
210
|
-
<
|
|
211
|
-
<
|
|
212
|
-
<
|
|
213
|
-
</
|
|
205
|
+
<view>
|
|
206
|
+
<text>UUID: {{ uuid() }}</text>
|
|
207
|
+
<pressable (press)="handleHash()">
|
|
208
|
+
<text>Hash a string</text>
|
|
209
|
+
</pressable>
|
|
214
210
|
@if (hash()) {
|
|
215
|
-
<
|
|
211
|
+
<text>SHA-256: {{ hash() }}</text>
|
|
216
212
|
}
|
|
217
|
-
</
|
|
213
|
+
</view>
|
|
218
214
|
`,
|
|
219
215
|
})
|
|
220
216
|
export class CryptoScreen {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/crypto",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "expo-crypto wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Cryptographically secure random bytes, randomUUID, and string/buffer digest hashing (SHA-1/256/384/512, MD2/MD4/MD5).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
"solid-js": ">=1.9.0",
|
|
81
81
|
"svelte": ">=5.56.0",
|
|
82
82
|
"vue": ">=3.5.0",
|
|
83
|
-
"@symbiote-native/angular": "^
|
|
84
|
-
"@symbiote-native/engine": "^0.
|
|
85
|
-
"@symbiote-native/react": "^
|
|
86
|
-
"@symbiote-native/solid": "^
|
|
87
|
-
"@symbiote-native/svelte": "^
|
|
88
|
-
"@symbiote-native/vue": "^
|
|
83
|
+
"@symbiote-native/angular": "^2.0.0",
|
|
84
|
+
"@symbiote-native/engine": "^0.5.0",
|
|
85
|
+
"@symbiote-native/react": "^2.0.0",
|
|
86
|
+
"@symbiote-native/solid": "^2.0.0",
|
|
87
|
+
"@symbiote-native/svelte": "^2.0.0",
|
|
88
|
+
"@symbiote-native/vue": "^2.0.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
91
91
|
"@symbiote-native/angular": {
|
|
@@ -133,13 +133,13 @@
|
|
|
133
133
|
"solid-js": "^1.9.14",
|
|
134
134
|
"svelte": "^5.56.0",
|
|
135
135
|
"typescript": "~6.0.0",
|
|
136
|
-
"@symbiote-native/angular": "
|
|
137
|
-
"@symbiote-native/engine": "0.
|
|
138
|
-
"@symbiote-native/react": "
|
|
139
|
-
"@symbiote-native/solid": "
|
|
140
|
-
"@symbiote-native/svelte": "
|
|
136
|
+
"@symbiote-native/angular": "2.0.0",
|
|
137
|
+
"@symbiote-native/engine": "0.5.0",
|
|
138
|
+
"@symbiote-native/react": "2.0.0",
|
|
139
|
+
"@symbiote-native/solid": "2.0.0",
|
|
140
|
+
"@symbiote-native/svelte": "2.0.0",
|
|
141
141
|
"@symbiote-native/test-utils": "0.3.0",
|
|
142
|
-
"@symbiote-native/vue": "
|
|
142
|
+
"@symbiote-native/vue": "2.0.0"
|
|
143
143
|
},
|
|
144
144
|
"scripts": {
|
|
145
145
|
"typecheck": "tsc --build",
|