public async verifySign()

in src/index.ts [85:103]


  public async verifySign(
    signature: string,
    data: string | Buffer,
    secretId: string,
    shouldCache = false
  ): Promise<boolean> {
    const publicKey = this.keyMap.get(secretId);
    if (publicKey) {
      return this.cryptoClient.verify(publicKey, data, signature);
    } else {
      // Fetch the key from ASM and verify the sign. Cache the key if the options say so
      const key = await this.asmClient.getSecret({ SecretId: secretId });
      if (shouldCache) {
        this.keyMap.set(secretId, key);
      }

      return this.cryptoClient.verify(key, data, signature);
    }
  }