{"id":19494859,"url":"https://github.com/armortal/webcrypto-go","last_synced_at":"2025-06-23T10:36:34.770Z","repository":{"id":166294550,"uuid":"641763695","full_name":"armortal/webcrypto-go","owner":"armortal","description":"An implementation of the W3C Web Cryptography API specification for Go.","archived":false,"fork":false,"pushed_at":"2025-01-22T23:10:21.000Z","size":132,"stargazers_count":5,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T15:27:30.222Z","etag":null,"topics":["crypto","cryptography","go","golang","webcrypto","webcrypto-api","webcryptography-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/armortal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-17T05:54:50.000Z","updated_at":"2025-02-27T14:20:43.000Z","dependencies_parsed_at":"2025-02-09T03:42:21.447Z","dependency_job_id":"52aabfb1-2094-4df8-bfc1-15775cbfd5e4","html_url":"https://github.com/armortal/webcrypto-go","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/armortal/webcrypto-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armortal%2Fwebcrypto-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armortal%2Fwebcrypto-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armortal%2Fwebcrypto-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armortal%2Fwebcrypto-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armortal","download_url":"https://codeload.github.com/armortal/webcrypto-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armortal%2Fwebcrypto-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261462943,"owners_count":23162052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crypto","cryptography","go","golang","webcrypto","webcrypto-api","webcryptography-api"],"created_at":"2024-11-10T21:34:12.580Z","updated_at":"2025-06-23T10:36:29.751Z","avatar_url":"https://github.com/armortal.png","language":"Go","readme":"# webcrypto-go [![test](https://github.com/armortal/webcrypto-go/actions/workflows/test.yaml/badge.svg)](https://github.com/armortal/webcrypto-go/actions/workflows/test.yaml)\n\nAn implementation of the W3C Web Cryptography API specification (https://www.w3.org/TR/WebCryptoAPI/) for Go using Go's standard `crypto` library.\n\n\u003e [!IMPORTANT]  \n\u003e Whilst we try to ensure that we don't commit breaking changes until we release our first major version, there\n\u003e may be times where decisions made during early development no longer make sense and therefore require\n\u003e breaking changes. Please be mindful of this when updating your version of this library until we hit `v1.0.0`.\n\n## Contents\n\n- [Background](#background)\n- [Implementation status](#implementation-status)\n- [Getting started](#getting-started)\n- [Algorithms](#algorithms)\n\t- [ECDSA](#ecdsa)\n\t\t- [Parameter Definitions](#parameter-definitions)\n\t\t- [Examples](#examples)\n\t- [HMAC](#hmac)\n\t\t- [Parameter Definitions](#parameter-definitions-1)\n\t\t- [Examples](#examples-1)\n\t- [RSA-OAEP](#rsa-oaep)\n\t\t- [Parameter Definitions](#parameter-definitions-2)\n\t\t- [Examples](#examples-2)\n\t- [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5)\n\t\t- [Parameter Definitions](#parameter-definitions-3)\n\t- [SHA](#sha)\n\t\t- [Parameter Definitions](#parameter-definitions-4)\n\t\t- [Examples](#examples-3)\n- [Contributing](#contributing)\n\n## Background\n\nThe Web Cryptography API is an open standard developed by the W3C and *\"defines a low-level interface to interacting with cryptographic key material that is managed or exposed by user agents\"* (https://www.w3.org/TR/WebCryptoAPI/).\n\nAlthough the Web Cryptography API was developed for JavaScript, the way we use cryptographic functions in applications across programming languages is unique to the language itself. This library aims to keep these operations consistent across languages so that developers can use documentation and knowledge from a well known open-standard to develop their applications easily and consistently. Cryptography is hard, and we hope this library can help all developers on their cryptographic journey.\n\nThe documentation and references used throughout this library come from the amazing authors at:\n- [W3C Web Cryptography API Specification](https://www.w3.org/TR/WebCryptoAPI/)\n- [Mozilla Web Crypto API Docs](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)\n\n## Implementation status\n\nThis library is still in active development and all algorithms are not yet supported. While we continue working on implementations that we think are priority, we welcome feedback and contributions from our open-source community. Below are algorithms and their usages that have been implemented.\n\n| Algorithm | encrypt | decrypt | sign | verify | digest | generateKey | deriveKey | deriveBits | importKey | exportKey | wrapKey | unwrapKey | \n| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | \n| [ECDSA](#ecdsa) |||:white_check_mark:|:white_check_mark:||:white_check_mark:|||:white_check_mark:|:white_check_mark:|||\n| [HMAC](#hmac) |||:white_check_mark:|:white_check_mark:||:white_check_mark:|||:white_check_mark:|:white_check_mark:|||\n| [RSA-OAEP](#rsa-oaep) |:white_check_mark:|:white_check_mark:||||:white_check_mark:|||:white_check_mark:|:white_check_mark:|||\n| [SHA](#sha) |||||:white_check_mark:||||||||\n\n## Getting started\n\n`go get github.com/armortal/webcrypto-go`\n\n## Algorithms\n\nWhen passing algorithm params into subtle functions, we use the `webcrypto.Algorithm` struct. It has the following properties:\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| Name | `string` | The algorithm name. |\n| Params | `any` | The algorithm parameters as defined by the parameters described by that algorithm in the WebCrypto specification. |\n\nSee specific algorithms for the parameter types to be passed in.\n\n### ECDSA\n\nThe **ECDSA** algorithm is the implementation of operations described in [§23](https://www.w3.org/TR/WebCryptoAPI/#ecdsa) of the W3C specification. \n\n`import \"github.com/armortal/webcrypto-go/algorithms/ecdsa\"`\n\n#### Parameter Definitions\n\nBelow are the parameters that supported ECDSA operations will take according to \n[§23.2](https://www.w3.org/TR/WebCryptoAPI/#ecdsa-registration).\n\n##### Params\n\nAs specified in [§23.3](https://www.w3.org/TR/WebCryptoAPI/#EcdsaParams-dictionary)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| Hash | `string` | The hash algorithm to use. See the supported [hash algorithms](#parameter-definitions-4) |\n\n##### KeyGenParams\n\nAs specified in [§23.4](https://www.w3.org/TR/WebCryptoAPI/#EcKeyGenParams-dictionary)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| NamedCurve | `string` | A valid named curve. One of `P-256`, `P-384`, or `P-521`. |\n\n##### KeyImportParams\n\nAs specified in [§23.6](https://www.w3.org/TR/WebCryptoAPI/#EcKeyImportParams-dictionary)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| NamedCurve | `string` | A valid named curve. One of `P-256`, `P-384`, or `P-521`. |\n\n#### Examples\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/armortal/webcrypto-go\"\n\t\"github.com/armortal/webcrypto-go/algorithms/ecdsa\"\n)\n\nfunc main() {\n\t// generate a new P-256 ECDSA key\n\tkey, err := webcrypto.Subtle().GenerateKey(\n\t\t\u0026webcrypto.Algorithm{\n\t\t\tName: \"ECDSA\",\n\t\t\tParams: \u0026ecdsa.KeyGenParams{\n\t\t\t\tNamedCurve: \"P-256\",\n\t\t\t},\n\t\t}, true, []webcrypto.KeyUsage{\n\t\t\twebcrypto.Sign,\n\t\t\twebcrypto.Verify,\n\t\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// key returned is a webcrypto.CryptoKeyPair that contains two *ecdsa.CryptoKey\n\tcryptoKeyPair := key.(webcrypto.CryptoKeyPair)\n\n\t// sign some data with the private key\n\tsig, err := webcrypto.Subtle().Sign(\u0026webcrypto.Algorithm{\n\t\tName: \"ECDSA\",\n\t\tParams: \u0026ecdsa.Params{\n\t\t\tHash: \"SHA-256\",\n\t\t},\n\t}, cryptoKeyPair.PrivateKey(), []byte(\"test\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// verify the signature with the public key\n\tok, err := webcrypto.Subtle().Verify(\u0026webcrypto.Algorithm{\n\t\tName: \"ECDSA\",\n\t\tParams: \u0026ecdsa.Params{\n\t\t\tHash: \"SHA-256\",\n\t\t},\n\t}, cryptoKeyPair.PublicKey(), sig, []byte(\"test\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif !ok {\n\t\tpanic(\"signature didn't verify\")\n\t}\n\n\t// export the public/private key as webcrypto.JsonWebKey\n\tout, err := webcrypto.Subtle().ExportKey(webcrypto.Jwk, cryptoKeyPair.PrivateKey())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// do something with jwk\n\tjwk := out.(*webcrypto.JsonWebKey)\n\n\t// export the key as PKCS8\n\tout, err = webcrypto.Subtle().ExportKey(webcrypto.PKCS8, cryptoKeyPair.PrivateKey())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// do something with the pkcs8 key\n\tpkcs8 := out.([]byte)\n\n\t// import a public/private key from a jwk\n\tin, err := webcrypto.Subtle().ImportKey(webcrypto.Jwk, jwk, \u0026webcrypto.Algorithm{\n\t\tName: \"ECDSA\",\n\t\tParams: \u0026ecdsa.KeyImportParams{\n\t\t\tNamedCurve: \"P-256\",\n\t\t},\n\t}, true, []webcrypto.KeyUsage{\n\t\twebcrypto.Sign,\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// import a public/private key from PKCS8\n\tin, err = webcrypto.Subtle().ImportKey(webcrypto.PKCS8, pkcs8, \u0026webcrypto.Algorithm{\n\t\tName: \"ECDSA\",\n\t\tParams: \u0026ecdsa.KeyImportParams{\n\t\t\tNamedCurve: \"P-256\",\n\t\t},\n\t}, true, []webcrypto.KeyUsage{\n\t\twebcrypto.Sign,\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// do something with the imported webcrypto.CryptoKey\n\tfmt.Println(in.Type())\n}\n```\n\n### HMAC\n\nThe **HMAC** algorithm is the implementation of operations described in [§29](https://www.w3.org/TR/WebCryptoAPI/#hmac) of the W3C specification. \n\n`import \"github.com/armortal/webcrypto-go/algorithms/hmac\"`\n\n#### Parameter Definitions\n\nBelow are the parameters that supported HMAC operations will take according to \n[§29.2](https://www.w3.org/TR/WebCryptoAPI/#hmac-registration).\n\n##### KeyGenParams\n\nAs specified in [§29.5](https://www.w3.org/TR/WebCryptoAPI/#hmac-keygen-params)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| Hash | `string` | The inner hash function to use. See the supported [hash algorithms](#parameter-definitions-4). |\n| Length | `uint64` | The length (in bits) of the key to generate. If unspecified, the recommended length will be used, which is the size of the associated hash function's block size. |\n\n##### ImportParams\n\nAs specified in [§29.3](https://www.w3.org/TR/WebCryptoAPI/#hmac-importparams)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| Hash | `string` | The inner hash function to use. See the supported [hash algorithms](#parameter-definitions-4). |\n| Length | `uint64` | The length (in bits) of the key. |\n\n#### Examples\n\n```go\npackage main\n\nimport (\n\t\"github.com/armortal/webcrypto-go\"\n\t\"github.com/armortal/webcrypto-go/algorithms/hmac\"\n)\n\nfunc main() {\n\t// generate a new key\n\tkey, err := webcrypto.Subtle().GenerateKey(\n\t\t\u0026webcrypto.Algorithm{\n\t\t\tName: \"HMAC\",\n\t\t\tParams: \u0026hmac.KeyGenParams{\n\t\t\t\tHash: \"SHA-256\",\n\t\t\t},\n\t\t}, true, []webcrypto.KeyUsage{\n\t\t\twebcrypto.Sign,\n\t\t\twebcrypto.Verify,\n\t})\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// the generated key returns a webcrypto.CryptoKey\n\tcryptokey := key.(webcrypto.CryptoKey)\n\n\t// sign some data - no params required.\n\tsig, err := webcrypto.Subtle().Sign(\u0026webcrypto.Algorithm{\n\t\tName: \"HMAC\",\n\t}, cryptokey, []byte(\"test\"))\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// verify the signature\n\tok, err := webcrypto.Subtle().Verify(\u0026webcrypto.Algorithm{\n\t\tName: \"HMAC\",\n\t}, cryptokey, sig, []byte(\"test\"))\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// export the key as *webcrypto.JsonWebKey\n\tout, err := webcrypto.Subtle().ExportKey(webcrypto.Jwk, cryptoKey)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tjwk := out.(*webcrypto.JsonWebKey)\n\t// do something with jwk\n\n\t// export the key as raw bytes\n\tout, err = webcrypto.Subtle().ExportKey(webcrypto.Raw, cryptoKey)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\traw := out.([]byte)\n\t// do something with raw bytes\n\n\t// import a key from a jwk\n\tin, err := webcrypto.Subtle().ImportKey(\n\t\twebcrypto.Jwk, \n\t\tjwk, \n\t\t\u0026webcrypto.Algorithm{\n\t\t\tName: \"HMAC\",\n\t\t\tParams: \u0026hmac.ImportParams{\n\t\t\t\tHash: \"SHA-256\",\n\t\t\t},\n\t\t}, \n\t\ttrue, \n\t\t[]webcrypto.KeyUsage{\n\t\t\twebcrypto.Sign,\n\t\t\twebcrypto.Verify,\n\t\t})\n\t\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// import a key from raw bytes\n\tin, err = webcrypto.Subtle().ImportKey(\n\t\twebcrypto.Raw, \n\t\traw, \n\t\t\u0026webcrypto.Algorithm{\n\t\t\tName: \"HMAC\",\n\t\t\tParams: \u0026hmac.ImportParams{\n\t\t\t\tHash: \"SHA-256\",\n\t\t\t},\n\t\t}, \n\t\ttrue, \n\t\t[]webcrypto.KeyUsage{\n\t\t\twebcrypto.Sign,\n\t\t\twebcrypto.Verify,\n\t\t})\n\t\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// do something with your imported keys\n}\n```\n\n### RSA-OAEP\n\nThe **RSA-OAEP** algorithm is the implementation of operations described in [§22](https://www.w3.org/TR/WebCryptoAPI/#rsa-oaep) of the W3C specification.\n\n`import \"github.com/armortal/webcrypto-go/algorithms/rsa\"`\n\n#### Parameter Definitions\n\nBelow are the parameters that supported RSA-OAEP operations will take according to \n[§22.2](https://www.w3.org/TR/WebCryptoAPI/#rsa-oaep-registration).\n\n#### OaepParams\n\nAs specified in [§22.3](https://www.w3.org/TR/WebCryptoAPI/#rsa-oaep-params)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| Label | `string` | The optional label/application data to associate with the message. |\n\n#### Examples\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"math/big\"\n\n\t\"github.com/armortal/webcrypto-go\"\n\t\"github.com/armortal/webcrypto-go/algorithms/rsa\"\n)\n\nfunc main() {\n\t// generate a new key\n\tkey, err := webcrypto.Subtle().GenerateKey(\n\t\t\u0026webcrypto.Algorithm{\n\t\t\tName: \"RSA-OAEP\",\n\t\t\tParams: \u0026rsa.HashedKeyGenParams{\n\t\t\t\tKeyGenParams: rsa.KeyGenParams{\n\t\t\t\t\tModulusLength:  2048,\n\t\t\t\t\tPublicExponent: big.NewInt(65537),\n\t\t\t\t},\n\t\t\t\tHash: \"SHA-256\",\n\t\t\t},\n\t\t}, true, []webcrypto.KeyUsage{webcrypto.Decrypt, webcrypto.Encrypt})\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tcryptoKeyPair := key.(webcrypto.CryptoKeyPair)\n\n\t// encrypt some data with an optional label\n\tencrypted, err := webcrypto.Subtle().Encrypt(\u0026webcrypto.Algorithm{\n\t\tName: \"RSA-OAEP\",\n\t\tParams: \u0026rsa.OaepParams{\n\t\t\tLabel: []byte(\"optional\"),\n\t\t},\n\t}, cryptoKeyPair.PublicKey(), []byte(\"test\"))\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// decrypt the data\n\tdecrypted, err := webcrypto.Subtle().Decrypt(\u0026webcrypto.Algorithm{\n\t\tName: \"RSA-OAEP\",\n\t\tParams: \u0026rsa.OaepParams{\n\t\t\tLabel: []byte(\"optional\"),\n\t\t},\n\t}, cryptoKeyPair.PrivateKey(), encrypted)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// do something with decrypted data\n\tfmt.Println(string(decrypted))\n\n\t// export the private/public key as jwk\n\tout, err := webcrypto.Subtle().ExportKey(webcrypto.Jwk, cryptoKeyPair.PrivateKey())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// do something with jwk\n\tjwk := out.(*webcrypto.JsonWebKey)\n\n\t// import a key from jwk\n\tin, err := webcrypto.Subtle().ImportKey(webcrypto.Jwk, jwk, \u0026webcrypto.Algorithm{\n\t\tName: \"RSA-OAEP\",\n\t\tParams: \u0026rsa.HashedImportParams{\n\t\t\tHash: \"SHA-256\",\n\t\t},\n\t}, true, []webcrypto.KeyUsage{webcrypto.Decrypt})\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// do something with the imported key\n\tfmt.Println(in.Type())\n}\n```\n\n### RSASSA-PKCS1-v1_5\n\nThis algorithm is currently not supported. However, parameter definitions for those used in [RSA-OAEP](#rsa-oaep) operations \ncome from those defined in this algorithm.\n\n#### Parameter Definitions\n\nBelow are the parameters that supported RSASSA-PKCS1-v1_5 operations will take according to \n[§20.2](https://www.w3.org/TR/WebCryptoAPI/#rsassa-pkcs1-registration).\n\n##### KeyGenParams\n\nAs specified in [§20.3](https://www.w3.org/TR/WebCryptoAPI/#RsaKeyGenParams-dictionary)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| ModulusLength | `uint64` | The length, in bits, of the RSA modulus. |\n| PublicExponent | `*big.Int` | The RSA public exponent. |\n\n##### HashedKeyGenParams\n\nAs specified in [§20.4](https://www.w3.org/TR/WebCryptoAPI/#RsaHashedKeyGenParams-dictionary)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| Hash | `string` | The [hash algorithm](#parameter-definitions-4) to use. |\n| ModulusLength | `uint64` | The length, in bits, of the RSA modulus. |\n| PublicExponent | `*big.Int` | The RSA public exponent. |\n\n##### HashedImportParams\n\nAs specified in [§20.7](https://www.w3.org/TR/WebCryptoAPI/#RsaHashedImportParams-dictionary)\n\n| Field | Type | Description |\n| :---- | :--- | :---------- |\n| Hash | `string` | The [hash algorithm](#parameter-definitions-4) to use. |\n\n\n### SHA\n\nThe **SHA** algorithm is the implementation of operations described in [§30](https://www.w3.org/TR/WebCryptoAPI/#sha) of the W3C specification.\n\n`import \"github.com/armortal/webcrypto-go/algorithms/sha\"`\n\n#### Parameter Definitions\n\nBelow are the recognized algorithm names for supported SHA operations according to \n[§30.2](https://www.w3.org/TR/WebCryptoAPI/#sha-registration).\n\n- `SHA-1`\n- `SHA-256`\n- `SHA-384`\n- `SHA-512`\n\nThere are no parameter definitions, however we use [Params](#params-1) below for importing purposes.\n\n##### Params\n\nThis is an empty struct that we use to register SHA algorithms without using a blank import. If you don't\nuse this as in `webcrypto.Algorithm.Params` to the `Digest()` call, you can import the algorithm using\na blank import like below:\n\n`import _ \"github.com/armortal/webcrypto-go/algorithms/sha\"`\n\n#### Examples\n\n```go\npackage main\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\n\t\"github.com/armortal/webcrypto-go\"\n\t\"github.com/armortal/webcrypto-go/algorithms/sha\"\n)\n\nfunc main() {\n\t// digest something\n\thash, err := webcrypto.Subtle().Digest(\n\t\t\u0026webcrypto.Algorithm{\n\t\t\tName:   \"SHA-256\",\n\t\t\tParams: \u0026sha.Params{}, // we use *sha.Params so we can register the algorithm without using a blank import\n\t\t}, []byte(\"test\"))\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// do something with hash\n\tfmt.Println(hex.EncodeToString(hash))\n}\n\n```\n\n## Contributing\n\nIf you have found a bug or would like to see new features, please create a new issue in this repository. If there is an issue that poses a security risk, please refrain from posting the issue publicly and contact [support@armortal.com](mailto://support@armortal.com) instead.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmortal%2Fwebcrypto-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmortal%2Fwebcrypto-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmortal%2Fwebcrypto-go/lists"}