toSecretKey method
SecretKey
toSecretKey()
Constructs a SecretKey
from this Jwk.
Implementation
SecretKey toSecretKey() {
switch (kty) {
case 'OCT':
return SecretKey(
Uint8List.fromList(k ?? const <int>[]),
);
default:
throw StateError('Not a secret key (kty: $kty)');
}
}