signURI method Null safety
Signs the URIScheme compliant URL with the signer's key pair.
Implementation
String signURI(String url, KeyPair signerKeypair) {
final String urlEncodedBase64Signature = _sign(url, signerKeypair);
if (verify(url, urlEncodedBase64Signature, signerKeypair)) {
return url +
"&" +
signatureParameterName +
"=" +
urlEncodedBase64Signature;
} else {
throw Exception("could not sign uri");
}
}