better_jwk 1.0.0 copy "better_jwk: ^1.0.0" to clipboard
better_jwk: ^1.0.0 copied to clipboard

JWK (JSON Web Key) encoding and decoding (for package:better_cryptography).

Pub Package Github Actions CI

Overview #

JWK (JSON Web Key) encoding and decoding. Designed to be used with package:cryptography.

Maintained by Gohilla Ltd. Licensed under the Apache License 2.0.

Examples #

Encoding KeyPair #

import 'package:cryptography/better_cryptography.dart';
import 'package:jwk/better_jwk.dart';

void main() {
  final keyPair = RsaKeyPairGenerator().newKeyPair();
  final jwk = Jwk.fromKeyPair(keyPair);
  final json = jwk.toJson();
}

Decoding SecretKey #

import 'package:jwk/better_jwk.dart';

void main() {
  final jwk = Jwk.fromJson({
    'kty': 'OCS',
    'x': 'base 64 string',
  });
  final secretKey = jwk.toSecretKey();
}
0
likes
150
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

JWK (JSON Web Key) encoding and decoding (for package:better_cryptography).

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

better_cryptography, collection

More

Packages that depend on better_jwk