createSigner method
Creates a Signer using the private key and the specified algorithm.
Implementation
Signer createSigner(Identifier algorithm) {
if (privateKey == null) {
throw StateError('Need a private key to create a signer.');
}
return privateKey!.createSigner(algorithm);
}