Questions tagged [signature]

In computer programming, especially object-oriented programming, a method is commonly identified by its unique method signature, which usually includes the method name, and the number, types and order of its parameters. A method signature is the smallest type of a method. The signature tag should not be used to tag questions about digital signatures, email signatures or written signatures.

Method signature

In computer programming, especially object-oriented programming, a method is commonly identified by its unique method signature, which usually includes the method name, and the number, types and order of its parameters. A method signature is the smallest type of a method.

Method overloading

Method signatures can be used by the compiler to distinguish between methods with the same name, but with different parameters. This is called method overloading. The precise characteristics of method overloading depends on the programming language. Overloading should not be used for methods that perform an different operation as that will make the source code hard to read.

Examples

Example of declarations of two overloaded methods with the same name, but with a different method signature:

void drawPoint(int x, int y);
void drawPoint(Point p);

in this case it is likely that drawPoint(x, y) internally converts x and y into a Point instance. This kind of function is therefore called a convenience method.

Disambiguation

For digital signatures such as RSA or DSA signatures please use and/or . Email may contain an email-signature, PDF documents may contain a digitized written signature. These signatures don't have specialized tags, please use more generic tags such as and instead.

2003 questions
9
votes
2 answers

verify gpg signature without installing key

How do i verify a gpg signature (cli or w/ node js) without installing the public key? i do have the public key but don't want to add it to the keyring. Any hints? Thanks, Florian
Florian
  • 3,145
  • 1
  • 27
  • 38
9
votes
1 answer

In-app purchase signature verification with PHP openssl

In an attempt to follow some of the security guidelines for in-app purchase here: http://developer.android.com/guide/market/billing/billing_best_practices.html I am trying to do signature validation on a server instead of in the app iteself. I…
user801255
  • 607
  • 1
  • 8
  • 23
9
votes
2 answers

OpenSSL : Encrypt with private key and decrypt with public key in RSA

I want to encrypt a file with the private key using OpenSSL with the RSA algorithm: openssl rsautl -in txt.txt -out txt2.txt -inkey private.pem -encrypt Now if I do a decrypt operation: openssl rsautl -in txt2.txt -pubin -inkey public.pem…
monkeyUser
  • 4,301
  • 7
  • 46
  • 95
9
votes
1 answer

What is the difference between PublicKeyToken and public key?

Each signed .NET has both a public key token (8 byte) and a public key (128 bytes). What is the difference between the 2, and why do we need two public "keys"?
sthiers
  • 3,489
  • 5
  • 34
  • 47
9
votes
10 answers

Laravel 5.7 signed route returns 403 invalid signature

I'm trying to take advantage of the new signed middleware in Laravel 5.7, but for some reason the generated signed URL is returning 403 Invalid Signature. I'm using the latest Laravel Version, with PHP 7.2 This is my web.php route:…
NaturalDevCR
  • 803
  • 1
  • 11
  • 34
9
votes
1 answer

How to sign with RSASSA-PSS in Java correctly?

I need to code this openssl-sign-instruction in java. openssl dgst -sha256 -binary -out "signaturefile".sig -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:-1 -sign "privatekey".pem "file2sign" This instruction comes from Bundeszentralamt für…
Felix Ullrich
  • 279
  • 2
  • 8
9
votes
1 answer

RSACryptoServiceProvider in Node js

I have to sign a string in node js, in the same way of a C# application, which uses RSACryptoServiceProvider. In fact it uses X509Certificate2 certificate = new X509Certificate2("file.pfx", "aPassword",…
PabloF
  • 91
  • 4
9
votes
3 answers

TypeError: ufunc 'add' did not contain a loop

I use Anaconda and gdsCAD and get an error when all packages are installed correctly. Like explained here: http://pythonhosted.org/gdsCAD/ TypeError: ufunc 'add' did not contain a loop with signature matching types dtype('S32') dtype('S32')…
Raphael Pilz
  • 91
  • 1
  • 1
  • 5
9
votes
2 answers

Error when verifying ECDSA signature in Java with BouncyCastle

I have tested a solution to verify an ECDSA signature (How can I get a PublicKey object from EC public key bytes?) that works perfect with the given data. This is the data: byte[] pubKey =…
CarlosRos
  • 389
  • 6
  • 15
9
votes
3 answers

What guarantees that the overloaded non-const method is invoked?

Given these 2 functions that modify and return a string: // modify the original string, and for convenience return a reference to it std::string &modify( std::string &str ) { // ...do something here to modify the string... return str; } //…
Stéphane
  • 19,459
  • 24
  • 95
  • 136
8
votes
2 answers

Obtain generated debug key/certificate for developing on different machines

I'm using Eclipse to develop an app and I have two computers (a desktop and laptop) that I want to use to develop this app. I recently set up my laptop with Eclipse and imported the project over to that computer. However, I realized that I can't…
Brian
  • 7,955
  • 16
  • 66
  • 107
8
votes
1 answer

_signTypedData method on ethers does not match with ERC712 solidity code

I've faced an ethers signature unmatched problem. Everything is normal. Already compared domainData, types, message variable in the js code with contract. Below is the JS Code to generate signature and call contract. const contractAddress =…
Kwang
  • 211
  • 1
  • 3
  • 7
8
votes
3 answers

Tool to compare function signature to docstring

Is there a tool that can check if the arguments listed in the docstring match the signature of the function call? It should be able to deal with numpy-style docstrings. I am regularly using R CMD CHECK, which finds documentation/code mismatches in R…
8
votes
2 answers

Is AWS boto (python) supporting SES signature version 4?

Due to AWS deprecating Signature Version 3 in Oct 2020 for SES, I want to handle this issue with AWS boto (Python). But I didn't see any doc related to boto supporting signature version 4 for SES. Is anyone having similar issue and have solutions?
Jian Cui
  • 93
  • 1
  • 3
8
votes
2 answers

Java: more general method signature gives me a NoSuchMethodError

There is a jar that when it has been created was supposed to use a method MyClass.doSomething(List). This method has been changed to doSomething(Collection) and put into another jar (with this class only). I put my 2nd jar in front of my first jar…
Jordan
  • 594
  • 1
  • 6
  • 14