Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTCKey signatureForMessage, unable to verify signature in other frameworks #82

Open
mandelmonkey opened this issue Jul 20, 2016 · 0 comments

Comments

@mandelmonkey
Copy link

I Can verify a signature for message in corebitcoin but when I try to verify the signature in other frameworks such as bitcoin.j the signature is not valid, what is the correct way to get the signature as a string?

BTCKey * newKey = [[BTCKey alloc] init];

NSData * sig  = [newKey signatureForMessage:@"hello world"];


NSLog(@"sig:%@",sig.base58String);
NSLog(@"sig:%@",sig.BTCHash256.hex);
NSLog(@"sig:%@",sig.hex);

if([newKey isValidSignature:sig forMessage:@"hello world"]){
    NSLog(@"valid");
}
else{
    NSLog(@"not valid");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant