# Function

Static Public Summary
public | ECSignature(r: *, s: *) |
public | HmacSHA256(buffer: *, secret: *): * |
public | calcPubKeyRecoveryParam(curve: *, e: *, signature: *, Q: *): * Calculate pubkey extraction parameter. |
public | convert(type: *): * |
public | deterministicGenerateK(curve: *, hash: *, d: *, checkSig: *, nonce: *): * |
public | emitter(): * |
public | enforce(type: *, value: *) |
public | get(state: *): * |
public | normalize(brainKey: *): * |
public | recoverPubKey(curve: *, e: *, signature: *, i: *): * Recover a public key from a signature. |
public | ripemd160(data: *): * |
public | set(state: *): * |
public | sha256(data: *, encoding: *): string | Buffer |
public | sha512(data: *, encoding: *): string | Buffer |
public | sign(curve: *, hash: *, d: *, nonce: *): * |
public | template(op: *) Console print any transaction object with zero default values. |
public | verify(curve: *, hash: *, signature: *, Q: *): * |
public | verifyRaw(curve: *, e: *, signature: *, Q: *): * |

## Static Public

### public ECSignature(r: *, s: *) source

    import ECSignature from 'bitsharesjs/lib/ecc/src/ecsignature.js'

#### Params:

Name | Type | Attribute | Description
r | * |  |
s | * |  |

### public HmacSHA256(buffer: *, secret: *): * source

    import {HmacSHA256} from 'bitsharesjs/lib/ecc/src/hash.js'

#### Params:

Name | Type | Attribute | Description
buffer | * |  |
secret | * |  |

#### Return:

*

### public calcPubKeyRecoveryParam(curve: *, e: *, signature: *, Q: *): * source

    import {calcPubKeyRecoveryParam} from 'bitsharesjs/lib/ecc/src/ecdsa.js'

Calculate pubkey extraction parameter.

When extracting a pubkey from a signature, we have to distinguish four different cases. Rather than putting this burden on the verifier, Bitcoin includes a 2-bit value with the signature.

This function simply tries all four cases and returns the value that resulted in a successful pubkey recovery.

#### Params:

Name | Type | Attribute | Description
curve | * |  |
e | * |  |
signature | * |  |
Q | * |  |

#### Return:

*

### public convert(type: *): * source

    import convert from 'bitsharesjs/lib/serializer/src/convert.js'

#### Params:

Name | Type | Attribute | Description
type | * |  |

#### Return:

*

### public deterministicGenerateK(curve: *, hash: *, d: *, checkSig: *, nonce: *): * source

    import {deterministicGenerateK} from 'bitsharesjs/lib/ecc/src/ecdsa.js'

#### Params:

Name | Type | Attribute | Description
curve | * |  |
hash | * |  |
d | * |  |
checkSig | * |  |
nonce | * |  |

#### Return:

*

### public emitter(): * source

    import emitter from 'bitsharesjs/lib/chain/src/EmitterInstance.js'

#### Return:

*

### public enforce(type: *, value: *) source

    import enforce from 'bitsharesjs/lib/ecc/src/enforce_types.js'

#### Params:

Name | Type | Attribute | Description
type | * |  |
value | * |  |

### public get(state: *): * source

    import {get} from 'bitsharesjs/lib/chain/src/state.js'

#### Params:

Name | Type | Attribute | Description
state | * |  |

#### Return:

*

### public normalize(brainKey: *): * source

    import normalize from 'bitsharesjs/lib/ecc/src/BrainKey.js'

#### Params:

Name | Type | Attribute | Description
brainKey | * |  |

#### Return:

*

### public recoverPubKey(curve: *, e: *, signature: *, i: *): * source

    import {recoverPubKey} from 'bitsharesjs/lib/ecc/src/ecdsa.js'

Recover a public key from a signature.

See SEC 1: Elliptic Curve Cryptography, section 4.1.6, "Public Key Recovery Operation".

http://www.secg.org/download/aid-780/sec1-v2.pdf

#### Params:

Name | Type | Attribute | Description
curve | * |  |
e | * |  |
signature | * |  |
i | * |  |

#### Return:

*

### public ripemd160(data: *): * source

    import {ripemd160} from 'bitsharesjs/lib/ecc/src/hash.js'

#### Params:

Name | Type | Attribute | Description
data | * |  |

#### Return:

*

### public set(state: *): * source

    import {set} from 'bitsharesjs/lib/chain/src/state.js'

#### Params:

Name | Type | Attribute | Description
state | * |  |

#### Return:

*

### public sha256(data: *, encoding: *): string | Buffer source

    import {sha256} from 'bitsharesjs/lib/ecc/src/hash.js'

#### Params:

Name | Type | Attribute | Description
data | * |  |
encoding | * |  |

#### Return:

string | Buffer | Buffer when digest is null, or string

### public sha512(data: *, encoding: *): string | Buffer source

    import {sha512} from 'bitsharesjs/lib/ecc/src/hash.js'

#### Params:

Name | Type | Attribute | Description
data | * |  |
encoding | * |  |

#### Return:

string | Buffer | Buffer when digest is null, or string

### public sign(curve: *, hash: *, d: *, nonce: *): * source

    import {sign} from 'bitsharesjs/lib/ecc/src/ecdsa.js'

#### Params:

Name | Type | Attribute | Description
curve | * |  |
hash | * |  |
d | * |  |
nonce | * |  |

#### Return:

*

### public template(op: *) source

    import template from 'bitsharesjs/lib/serializer/src/template.js'

Console print any transaction object with zero default values.

#### Params:

Name | Type | Attribute | Description
op | * |  |

### public verify(curve: *, hash: *, signature: *, Q: *): * source

    import {verify} from 'bitsharesjs/lib/ecc/src/ecdsa.js'

#### Params:

Name | Type | Attribute | Description
curve | * |  |
hash | * |  |
signature | * |  |
Q | * |  |

#### Return:

*

### public verifyRaw(curve: *, e: *, signature: *, Q: *): * source

    import {verifyRaw} from 'bitsharesjs/lib/ecc/src/ecdsa.js'

#### Params:

Name | Type | Attribute | Description
curve | * |  |
e | * |  |
signature | * |  |
Q | * |  |

#### Return:

*