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
267
votes
5 answers

Difference between signature versions - V1 (Jar Signature) and V2 (Full APK Signature) while generating a signed APK in Android Studio?

Please select at least one of the signature versions to use in Android Studio 2.3 Now while generating a signed APK in Android Studio, it's showing two options (CheckBox) namely 1. V1 (Jar Signature) and 2. V2 (Full APK Signature) as Signature…
Shirish Herwade
  • 11,461
  • 20
  • 72
  • 111
153
votes
16 answers

installation app blocked by play protect

When trying to install a signed application (app-release.apk), a "Blocked by Play Protect" alert is shown and the app is not installed. However, an unsigned application (app-debug.apk) can be installed without problems. The error message: Play…
Mostafa Azadi
  • 2,893
  • 2
  • 12
  • 19
126
votes
4 answers

SAML: Why is the certificate within the Signature?

I have to implement SSO with SAML for my company's website (as the relying party). An essential part off course is the verification of the signature. Here is the signature part of a sample SAML from our partner company (asserting…
Dante
  • 1,261
  • 2
  • 9
  • 3
107
votes
4 answers

How to verify downloaded file with .sig file?

When I download GCC, it also has a .sig file, and I think it is provided to verify downloaded file. (I downloaded GCC from here). But I can't figure out how should I use it. I tried gpg, but it complains about public key. [root@localhost src]# gpg…
eonil
  • 83,476
  • 81
  • 317
  • 516
89
votes
2 answers

What does it mean when TsLint says "expected callSignature to have a typedef."

I have a function in my code: networkStop = (action: string = null) => { this.action[action] = false; this.net = false; this.netd = false; } I'm getting a TsLint error saying: Message 4 TsLint: expected callSignature to have a…
user1679941
82
votes
5 answers

What are the valid signatures for C's main() function?

What really are the valid signatures for main function in C? I know: int main(int argc, char *argv[]) Are there other valid ones?
Prady
  • 10,978
  • 39
  • 124
  • 176
77
votes
3 answers

How to get APK signing signature?

Is there a way to retrieve the signature of the key used to sign an APK? I signed my APK with my key from my keystore. How can I retrieve it programmatically?
Waypoint
  • 17,283
  • 39
  • 116
  • 170
49
votes
5 answers

what is the difference between function declaration and signature?

In C or C++ what is the difference between function declaration and function signature? I know something of function declaration but function signature is totally new to me. What is the point of having the concept of function signature? What are the…
Tim
  • 1
  • 141
  • 372
  • 590
45
votes
2 answers

C function with no parameters behavior

Can somebody explain to me why the following code does compile without a warning or error? I would expect the compiler to warn me that the function no_args doesn't expect any arguments. But the code compiles and runs function no_args…
John Retallack
  • 1,498
  • 2
  • 19
  • 31
40
votes
1 answer

Android N - how to check if apk is signed with schema v2

Android N provided new apk Signature Scheme v2, how can I check if a specific apk is signed with that new signature? Thanks
Lidi
  • 405
  • 1
  • 4
  • 5
40
votes
1 answer

Python - Facebook API - Need a working example

Ok, so i've googled around, i've found threads here on stackoverflow and i've checked the official Facebook wiki and.. and what not.. I now hope that one of you guys sits on a Facebook API sample code for Python. This is what i've got so far and all…
Torxed
  • 22,866
  • 14
  • 82
  • 131
38
votes
2 answers

How to view the identity of person who signed the apk on Android device?

I need to view who signed the application I have installed onto my device. Is this generally possible to do on the device or on PC?
Alexei Tymchenko
  • 383
  • 1
  • 3
  • 4
37
votes
4 answers

Maven verify signatures of downloaded pom/jar files

I was trying to find if there is SSL enabled central repository but there probably isn't. I noticed that there are signatures for every jar and pom file in maven central repository. So at least I'd like to check signatures of all maven downloaded…
IgorY
  • 535
  • 4
  • 7
35
votes
4 answers

Is List f() a useful signature

Is List f() a useful signature? Is there any problem with it / using it? This was an interview question. I know this: It compiles fine Use it like List lst = obj.f(), and then I can call on lst only those…
user10777718
  • 723
  • 4
  • 16
34
votes
8 answers

SignedXml.CheckSignature fails in .NET 4 but it works in .NET 3.5, 3 or 2

I have a response from a 3-rd party web service. I load an XmlDocument with that response. string txt = readStream.ReadToEnd(); response = new XmlDocument(); response.PreserveWhitespace = true; response.LoadXml(txt); return…
user1207548
  • 341
  • 1
  • 3
  • 4
1
2 3
99 100