Skip to content

Commit

Permalink
fix: make getpublickeybytes a promise
Browse files Browse the repository at this point in the history
Signed-off-by: Berend Sliedrecht <[email protected]>
  • Loading branch information
berendsliedrecht committed Nov 12, 2024
1 parent 17e3472 commit 6999268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export function generateKeypair(id: string, biometricsBacked = true) {
getSecureEnvironment().generateKeypair(id, biometricsBacked)
}

export function getPublicBytesForKeyId(keyId: string): Uint8Array {
const publicBytes = getSecureEnvironment().getPublicBytesForKeyId(keyId)
export async function getPublicBytesForKeyId(keyId: string): Promise<Uint8Array> {
const publicBytes = await getSecureEnvironment().getPublicBytesForKeyId(keyId)

if (Platform.OS === 'android') {
const spki = AsnParser.parse(publicBytes, SubjectPublicKeyInfo)
Expand Down

0 comments on commit 6999268

Please sign in to comment.