jwk_plus 0.2.4 copy "jwk_plus: ^0.2.4" to clipboard
jwk_plus: ^0.2.4 copied to clipboard

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

Pub Package Github Actions CI

Overview #

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

Licensed under the Apache License 2.0.

Getting started #

In pubspec.yaml

dependencies:
  cryptography_plus: ^2.7.0
  jwk_plus: ^0.2.4

Examples #

Encoding KeyPair #

import 'package:cryptography_plus/cryptography_plus.dart';
import 'package:jwk_plus/jwk_plus.dart';

Future<void> main() async {
  final keyPair = await RsaPss().newKeyPair();
  final jwk = Jwk.fromKeyPair(keyPair);
  final json = jwk.toJson();
}

Decoding SecretKey #

import 'package:jwk_plus/jwk_plus.dart';

void main() {
  final jwk = Jwk.fromJson({
    'kty': 'OCT',
    'alg': 'A128KW',
    'k': 'GawgguFyGrWKav7AX4VKUg',
  });
  final secretKey = jwk.toSecretKey();
}
1
likes
150
points
39
downloads

Publisher

verified publisheremz-hanauer.com

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

collection, cryptography_plus

More

Packages that depend on jwk_plus