signer property
Signer
signer
Implementation
Signer get signer {
switch (algorithm) {
case Algorithm.hmacSha256:
case Algorithm.hmacSha384:
case Algorithm.hmacSha512:
return HmacKey.fromJwk(this);
case Algorithm.rsaSha256:
case Algorithm.rsaSha384:
case Algorithm.rsaSha512:
return RsaPrivateKey.fromJwk(this);
case Algorithm.ecdsaSha256:
case Algorithm.ecdsaSha384:
case Algorithm.ecdsaSha512:
return EcdsaPrivateKey.fromJwk(this);
default:
break;
}
throw UnsupportedError('Algorithm not supported: $algorithm');
}