jwk 0.1.1 icon indicating copy to clipboard operation
jwk: ^0.1.1 copied to clipboard

JWK (JSON Web Key) encoding and decoding (for package: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/cryptography.dart';
import 'package:jwk/jwk.dart';

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

Decoding SecretKey #

import 'package:jwk/jwk.dart';

void main() {
  final jwk = Jwk.fromJson({
    'kty': 'OCS',
    'x': 'base 64 string',
  });
  final secretKey = jwk.toSecretKey();
}
2
likes
130
pub points
69%
popularity

Publisher

unverified uploader

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

Homepage

Documentation

API reference

License

Icon for licenses.Apache-2.0 (LICENSE)

Dependencies

collection, cryptography

More

Packages that depend on jwk