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
18
votes
6 answers

How to use PackageInfo.GET_SIGNING_CERTIFICATES in API 28?

The documentation of PackageManager.GET_SIGNATURES says "This constant was deprecated in API level 28. Use GET_SIGNING_CERTIFICATES instead". Unfortunately it was not secure and was easily hacked. How can you use the new "GET_SIGNING_CERTIFICATES"…
Ettore Gallina
  • 435
  • 1
  • 3
  • 16
17
votes
2 answers

SML: What's the difference between using abstype and using a signature to hide the implementation of a structure?

I've done a little work in SML in the past, but I'm now starting to get to the more interesting parts. Using the abstype...with...end construct, I can make things but keep their implementation details hidden. I can also create a signature of the…
Alan
  • 171
  • 1
  • 3
17
votes
6 answers

Call function in c++ dll without header

I would like to call a method from an dll, but i don't have the source neither the header file. I tried to use the dumpbin /exports to see the name of the method, but i can found the methods signature? Is there any way to call this method? Thanks,
mileschet
  • 371
  • 1
  • 6
  • 13
16
votes
2 answers

Android compare signature of current package with debug.keystore

As all we do I have application which is signed by debug.keystore (by default) when it is in development mode (build). When it goes production we sign it with our private key. Is there any way to determine at runtime that current package is signed…
zmeda
  • 2,909
  • 9
  • 36
  • 56
15
votes
5 answers

Android In-App Billing : Security.java says "Signature Verification Failed"

I have implemented a test app with Android's In-App Billing. I have filled in my Public Key in the Security.java file. Everything works, but when I submit the payment, the app crashes. I receive an error in LogCat that says "Signature Verification…
Chris
  • 5,485
  • 15
  • 68
  • 130
15
votes
4 answers

Sign SAML Response with or without Assertion Signature?

When signing a SAML Response that also has a signed Assertion, should I: A) Generate the Response signature without the Assertion signature. Then inject the Assertion signature after both signatures have been generated. B) Generate the Assertion…
Panman
  • 1,157
  • 2
  • 8
  • 19
15
votes
4 answers

How to capture human signature

I am new to Android. I am developing an application that requires a user signature. How can I capture a signature in Android?
ragu
  • 225
  • 1
  • 3
  • 11
15
votes
1 answer

Check signature of iOS app

Is it possible to check if iOS application is signed by its developer at applications runtime? I tried to download .ipa of some apps and resigning them with my developer ID and almost all of them worked on my iOS device. But some of them didn't, so…
Elviss Strazdins
  • 1,404
  • 14
  • 30
14
votes
2 answers

OCaml interface vs. signature?

I'm a bit confused about interfaces vs. signatures in OCaml. From what I've read, interfaces (the .mli files) are what govern what values can be used/called by the other programs. Signature files look like they're exactly the same, except that they…
14
votes
7 answers

Is there a library for iPhone to work with HMAC-SHA-1 encoding

For all operation with Amazon services(S3, EC2, SimpleDB) You need to sign all resquest with HMAC-SHA-1 Signature(http://en.wikipedia.org/wiki/HMAC ,…
AlfeG
  • 1,475
  • 4
  • 18
  • 33
14
votes
4 answers

How to Embed Image in Outlook Signature?

Is it possible to create an HTML email signature for Outlook 2003 or above that doesn't reference external images? That is, using those special "cid" reference but embed the image itself in the signature and not on the file system or network. This…
BlackMael
  • 3,198
  • 5
  • 25
  • 42
14
votes
1 answer

Python inspect module: keyword only args

The phrase "keyword only args" in Python is a bit ambiguous - usually I take it to mean args passed in to a **kwarg parameter. However, the inspect module seems to make a distinction between **kwarg and something called "keyword only…
Siler
  • 8,976
  • 11
  • 64
  • 124
14
votes
3 answers

Meaning of instantiation mode indicators in arguments of Prolog predicates

Looking at Prolog documentation, predicate signatures are sometimes written as following: foo(:Bar, +Baz, -Qux, ?Mop) What are :, +, - and ? for and how do I interpret them? Also, are these the only ones that exist or are there more of them?
user797257
14
votes
7 answers

Top-level const doesn't influence a function signature

From the C++ Primer 5th Edition, it says: int f(int){ /* can write to parameter */} int f(const int){ /* cannot write to parameter */} The two functions are indistinguishable. But as you know, the two functions really differ in how they can update…
Zachary
  • 1,633
  • 2
  • 22
  • 34
14
votes
2 answers

Using a PEM encoded, encrypted private key to sign a message natively

I'm trying to use a PEM(X.509) certificate (stored in a privateKey.pem file on disk) to sign messages sent via sockets in Java, but am having a lot of trouble finding an example that's close. I'm normally a C++ guy who's just stepping in to help on…
KevenK
  • 2,975
  • 3
  • 26
  • 33