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
11
votes
3 answers

R Backports and Invalid Signature

I run debian stable (bullseye) and I use the official R backports. See https://cloud.r-project.org/bin/linux/debian/ I added a line to mu repositories $ cat /etc/apt/sources.list | grep r-project deb http://cloud.r-project.org/bin/linux/debian…
larry77
  • 1,309
  • 14
  • 29
11
votes
3 answers

Create SHA256withRSA in two steps

For educational purposes, I would like to be able to first create a Hash for a String and then to create RSA Digital Signature from that Hash so that the result is the same as when using SHA256withRSA in one go. This way I want to confirm that I…
ivoronline
  • 829
  • 1
  • 9
  • 18
11
votes
1 answer

Add a signature, with annotations, to extension methods

When embedding Python in my application, and writing an extension type, I can add a signature to the method by using a properly crafted .tp_doc string. static PyMethodDef Answer_methods[] = { { "ultimate", (PyCFunction)Answer_ultimate,…
AJNeufeld
  • 8,526
  • 1
  • 25
  • 44
11
votes
2 answers

How to get the signature of a C++ bind(...) expression

I am trying to write a metafunction named signature_of which, given the type of a function (pointer), functor, or lambda, returns its signature. Here's what I have so far: #include #include…
HighCommander4
  • 50,428
  • 24
  • 122
  • 194
11
votes
1 answer

Can I use a standalone Signature as a signature in Perl 6?

I was playing around with a Perl 6 implementation of a command-line program that takes several switches. The signature to MAIN was quite involved and a bit messy. I wondered if there was a way to define the signature somewhere else and tell the…
brian d foy
  • 129,424
  • 31
  • 207
  • 592
11
votes
4 answers

Internet Explorer shows valid certificate as "corrupt or invalid signature"

We have signed our product installation using SignTool.exe and GoDaddy certificate, and our signature appears valid in windows and using "verify" option of SignTool. However, when the file is downloaded in Internet Explorer 9, it reports that "The…
11
votes
3 answers

Verifying that two apk files are signed with the same signature

I would like to verify that two APK files have been signed with the same certificate. I have the whole Java SDK available but would like to it from Java code to make for cross-platform reasons. Any ideas?
jonasmaturana
  • 287
  • 3
  • 10
11
votes
3 answers

What does "this" refer to in a C# method signature and is there a VB.NET equivalent?

I've been watching the ASP.NET MVC Storefront video series again and saw something that I've never noticed or payed any attention to before. I noticed there were a lot of references to this in the signature lists of various methods. Here is an…
Code Maverick
  • 20,171
  • 12
  • 62
  • 114
10
votes
4 answers

How does one read the function signatures from Python's official documentation

If one browses through the official Python docs, one can see function (or class) signatures of varying kinds. For example random.uniform(a, b) is simple to understand: You pass it two objects a and b (that are floating point numbers and it…
l7ll7
  • 1,309
  • 1
  • 10
  • 20
10
votes
3 answers

What is difference between signature and certificate in apk file?

I know a certificate contains a public key and some extra info (I hope) but is it saved in the apk file? Is it a file or text or what? And what is a signature exactly? And in Android which one could we easily read to verify the app?
Hamid Z
  • 180
  • 1
  • 14
10
votes
2 answers

signatures/types in functional programming (OCaml)

I started learning functional programming (OCaml), but I don't understand one important topic about fp: signatures (I'm not sure if it's a proper name). When I type something and compile with ocaml, I get for example: # let inc x = x + 1 ;; val inc…
lever7
  • 103
  • 1
  • 4
10
votes
1 answer

Const-Qualification of Main's Parameters in C++

The C++ standard mandates that all conforming implementations support the following two signatures for main: int main(); int main(int, char*[]); In case of the latter signature, would the addition of (top-level) const-ness break any language…
pt2cv
  • 103
  • 3
10
votes
4 answers

Use of Curve25519 in ECDSA

I'm currently investigating the use of curve25519 for signing. Original distribution and a C implementation (and a second C implementation). Bernstein suggests to use ECDSA for this but I could not find any code.
chmike
  • 20,922
  • 21
  • 83
  • 106
10
votes
1 answer

Automated F# Signature File (.fsi) Generation

I am working on a project that has a number of modules that I'd like to apply access control constraints to. I'd also like to have my project contain additional documentation on the type signatures of each function. I know that I can accomplish…
Impl0x
  • 103
  • 5
10
votes
1 answer

Check .apk-signature in C/native Code

I have developed an Android application which also contains a native part written in C (which does not depend on the app). The application itself is useless if the shared library does not do its work. I would like to let the native-part (a shared…
Martin L.
  • 3,006
  • 6
  • 36
  • 60